I got trigger like this that crashes the game ...
the events are TimeOfDay == 18 and TimeOfDay == 06.
EDIT: I want to make the night longer than the day. Since the game doesn't allow me
to change the time at which the day starts and the night starts then I got no choice
but to use SetTimeOfDayScale().
If anyone knows how to set the dawn at 16 and dusk at 8 plz tell me.
Changing the Gameplay Constants doesn't work.
EDIT2: The trigger crashes warcraft even when done using GUI
JASS:
function Trig_DayNightWeatherEffect_Actions takes nothing returns nothing
local real t = GetTimeOfDay()
if t >= 18 then
call SetTimeOfDayScale(0.5) //<- this line crashes the game
else
call SetTimeOfDayScale(1) //<- this line crashes the game
endif
endfunction
the events are TimeOfDay == 18 and TimeOfDay == 06.
EDIT: I want to make the night longer than the day. Since the game doesn't allow me
to change the time at which the day starts and the night starts then I got no choice
but to use SetTimeOfDayScale().
If anyone knows how to set the dawn at 16 and dusk at 8 plz tell me.
Changing the Gameplay Constants doesn't work.
EDIT2: The trigger crashes warcraft even when done using GUI
Trigger:
- Untitled Trigger 001
- Events
- Game - The in-game time of day becomes Equal to 6.00
- Game - The in-game time of day becomes Equal to 18.00
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (In-game time of day) Greater than or equal to 18.00
- Then - Actions
- Game - Set time of day speed to 50.00% of the default speed
- Else - Actions
- Game - Set time of day speed to 100.00% of the default speed
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events