• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Animation Problem

Status
Not open for further replies.
This problem's been around for a really long while, I've tried to fix everything to fix it with what I know about GUI. It's really difficult.

First of all, my objective with the trigger is, to turn on the lamp posts during evening, and turn off the lights when it's morning. It's really confusing.

Daytime (Lights Are OFF) - 6AM to 6PM
Nighttime (Lights Are ON) - 6PM to 6AM

The animations are set to play like that. View the script in the trigger in the Needs To Be Fixed category.

Please do not redistribute or copy this map. It's not even finished yet, gosh. Only view the trigger or view the map, do not take anything from it without my permission.
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,099
How about describing what of a problem occurred?

Also, to protect your map from redistributing and reducing the problem to itself without unnecessary variables, rather attach a test map instead of your original project.

Your trigger is not activated. When I enable it, dusk sets off the lamps as planned, dawn does not turn them on.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • 'IF'-Conditions
      • TimeOfDay Greater than or equal 18.00
      • TimeOfDay Lesser than 6.00
    • 'THEN'-Actions
      • Animation - Play the Stand (3.333 s) animation for all doodads of type Post Lantern (Lordy Summer) within (Playable map area)
    • 'ELSE'-Actions
You do not have an Or-block there in conditions. That's why all conditions have to be true to run Then-Actions. Obviously, your real variable TimeOfDay cannot be greater than or equal to 18.00 and, at the same time, below 6.00.

In another trigger you update TimeOfDay every 0.01 seconds to match what the Game - Time Of Day function returns. Sence? You could as well use this function directly. In addition, you do not even need to check the time of day periodically, there is an Game - Time Of Day event.
 
Status
Not open for further replies.
Top