Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 02 Feb 2013 05:17 AM |
I have this, but I want the lighting to go dark at night time, so its quite hard to see. Is this possible to do without a GUI?
l = game:service("Lighting") r = game:service("RunService")
while true do --Time and day l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+0.1) wait(.1) end |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
| |
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 02 Feb 2013 05:28 AM |
| Change the ambient. Also, you don't need the 'r' variable. |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 02 Feb 2013 05:40 AM |
| How would I change the ambient so it only changes at night time? |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 02 Feb 2013 05:48 AM |
| I want to make it so when it gets to night the screen gets darker and darker so you can barely see and after 2am it gets less darker and lighter to daytime agaibn. |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
| |
|
HD188753
|
  |
| Joined: 13 Jun 2012 |
| Total Posts: 5021 |
|
|
| 02 Feb 2013 06:34 AM |
| Use a script to check time and then accordingly change GUI transparency. |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 02 Feb 2013 06:56 AM |
| I want to do it without GUis though.. |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2013 08:25 AM |
| and its GetService() not service() |
|
|
| Report Abuse |
|
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 02 Feb 2013 09:11 AM |
| Add a condition checker (if) and set it to check if the time is equal to 1080 minutes after midnight. If it is, make the screen darker. 360 minutes after is 6:00:00. |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 02 Feb 2013 01:02 PM |
Im still confused, I'm quite a novice at scripting I watched pigheads youtubes. What is like the full line of script to change ambient? |
|
|
| Report Abuse |
|
|
Th30racle
|
  |
| Joined: 03 Nov 2012 |
| Total Posts: 214 |
|
|
| 02 Feb 2013 01:08 PM |
game.Lighting.FogEnd = (35) game.Lighting.FogColor = Color3.new(0,0,0)
Makes black fog. Hard to see through. |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 03 Feb 2013 07:19 AM |
| And how would I make it so this only happens at night, and changes back at day, based on my day and night script? |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 03 Feb 2013 08:16 AM |
l= game:service("Lighting") r = game:service("RunService")
while true do --Time and day l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+0.1) if l.TimeOfDay == 18:00:00 then l.FogEnd = 350 elseif l.TimeOfDay == 06:00:00 then l.Fogend = 700 wait(.1) end
still missing check function for the TimeOfDay. |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
| |
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 03 Feb 2013 10:54 AM |
^No.
You would get the error 'Attempt to compare number value with a sring value.'
Enclose the times in quotation marks.
"6:00:00" "18:00:00"
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2013 11:02 AM |
Mess with the lighting setting while using :GetMinutesAfterMidnight to see if it is night.
-bigdaddy92, Professional Web Developer & Master Scripter |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 03 Feb 2013 11:16 AM |
l= game:service("Lighting") r = game:service("RunService")
while true do --Time and day l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+0.1) if l.TimeOfDay == "18:00:00" then l.FogEnd = 350 elseif l.TimeOfDay == "06:00:00" then l.Fogend = 700 wait(.1) end
This would work? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2013 11:18 AM |
That says if it is EXACTLY that time, for that .1 seconds, so no.
-bigdaddy92, Professional Web Developer & Master Scripter |
|
|
| Report Abuse |
|
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 03 Feb 2013 11:22 AM |
I would use game.Lighting:GetMinutesAfterMidnight() == 360 to check the time. I find it more reliable.
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2013 11:28 AM |
I think you might be looking for:
if l.TimeOfDay > "18:00:00" and l.TimeOfDay < "6:00:00" then
and
elseif l.TimeOfDay >= "6:00:00" and l.TimeOfDay <= "18:00:00" then |
|
|
| Report Abuse |
|
|
Zanziber
|
  |
| Joined: 08 Dec 2008 |
| Total Posts: 5088 |
|
|
| 03 Feb 2013 12:56 PM |
| I'm not begging for you to make me a script but could one of you just complete it so I can see how it works because I'm totally confused right now. |
|
|
| Report Abuse |
|
|