• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Time of day trigger crash

Status
Not open for further replies.
Level 8
Joined
Jun 15, 2022
Messages
70
1669560864604.png

IDK why, but then game time becomes 6.00 - game crashes like alt+f4 without errors. Not critical for my map, if i turns off trigger, but.... why?!
 
Level 25
Joined
Sep 26, 2009
Messages
2,387
Just tried this myself and using wait this way does work (tested on reforged v1.33)
  • Untitled Trigger 002
    • Events
      • Game - The in-game time of day becomes Equal to 7.00
    • Conditions
    • Actions
      • Wait 0.00 seconds
      • Game - Set time of day speed to 300.00% of the default speed
My guess is that changing time of day or time of day speed causes all game time-related events to be reevaluated and possibly activated/fired again.
I imagine the following scenario:
1) Event - Time of day hits 7:00
2) Action - Time of day speed is changed
3) Previous step causes reevaluation of all game-time events
4) When reevaluation is finished, it is still 7:00 -> the game can fire the event in step 1 once again.

The above would repeat over and over, leading to infinite loop, resulting in game crash.
But this is just my guess, I have no proof or anything.
 
Level 39
Joined
Feb 27, 2007
Messages
5,034
But this is just my guess, I have no proof or anything.
Modify your trigger as below. If the crash is avoided then you're right:
  • Untitled Trigger 002
    • Events
      • Game - The in-game time of day becomes Equal to 7.00
    • Conditions
      • BOOLEAN equal to False
    • Actions
      • Wait 0.00 seconds
      • Set BOOLEAN = True
      • Game - Set time of day speed to 300.00% of the default speed
      • Set BOOLEAN = False
 
Status
Not open for further replies.
Top