Author Topic: OnDayTime/OnNightTime Events.  (Read 1417 times)

Does anyone know how to make a event for when it turns night time (When the sun is down/No light) an event is triggered? I want this event mainly for a RPG game I am working on so that when it is night time I can set music that is a soft breeze or something like in the night time. It will help with atmosphere and realism. Please if anyone can make this/knows something like this send me a link.

i have no clue but this information may be useful if someone wants to make the event

day cycles use a "fraction" system where 0 is sunrise, 0.5 is sunset, and 1 is an instant before the next sunrise
i can only take a guess that making an event like this has to do with when the daycycle reaches a value of the fraction, but nevertheless

Quote from: phases in a daycycle
//SUNRISE
FRACTION 0.010000
(or 0.00000000 i guess)

//NOON
FRACTION 0.250000

//SUNSET
FRACTION 0.500000

//MIDNIGHT
FRACTION 0.750000



Beware about the add-on Spartan linked. It's known to break stuff, from other peoples posts about it.

Oh, is there any other better mods then?


Beware about the add-on Spartan linked. It's known to break stuff, from other peoples posts about it.
Yeah, those events were so broken when I tried them.  They did not even work at all for me.

They do work for me though, I use them to turn on my back up zombies in my map.

Add-ons conflict it, but that shouldn't happen on the first place.

I'm planning to use daylight/nighttime events for my CityRPG, but I feel like I should make my own and use the known coding resources for daylight times.

Add-ons conflict it, but that shouldn't happen on the first place.

I'm planning to use daylight/nighttime events for my CityRPG, but I feel like I should make my own and use the known coding resources for daylight times.

Will you also release it to the public?

If it gets done correctly like the mod, then of course. I don't usually keep mods private for long unless I have a good reason for it