i have a day night cycle with the time based on minutes let say 60 RL minutes a a full cycle
no is the thing that i whant to have two differant ambiance sounds during the night/morning and late morning and day
so :
from 18:00 till 10:00
&
from 10:00 till 18:00
On the screenshot is wat i tryed and did not work
the audio played at the start when the time was manualy set to for example 18:00 but did not swap with the time hit 10:00 or the other way around
also tryed it on event tick but than the audio didnt play at all
oke this one kinda works the only problem with this is it doesnt stop the other sound so the play both
and it keeps spawning the the sound every check
and when its passes 10 it stays day sound is will not spawn back to to night sound
Bind a custom event to tick, after it executes/spawns the sound, unbind it. You’ll need to track the time at the tick event to know when to bind/unbind. This should be the only thing this tick event will do, so change the tick interval to something higher like 1 second or more so it doesn’t check time every frame.
If you don’t need the clock and REALLY need to get rid of the ticks every 2.5 seconds, you can change tick interval once every d/nigh change. For example: you start at 5, set tick interval for 5 seconds, when it runs at 10 change it to 8 so it runs again at 18, then change again to 16 to run it again at 10… etc
Got the math wrong here at the conversion of current time to 24 hours…
if 1 hour is full day cycle → 30 minutes = 108000 in game seconds for 12 hours / if 1 minute cycle → 30 seconds = 30 in game seconds for 12 hours. This is the math for conversion: