• 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.

how to open or close a gate in certain time?

Status
Not open for further replies.
Level 18
Joined
Sep 14, 2012
Messages
3,413
Check every 1s the time of day.
Then check if the time is day or night.
Then open/close ;)

  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • 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 6.00
          • (In-game time of day) Less than 18.00
        • Then - Actions
          • Destructible - Open (Gate)
        • Else - Actions
          • Destructible - Close (Gate)
The value of day/night might be wrong I do not know them :/

EDIT : I'm bad use below.
 
Here you go.

  • Untitled Trigger 001
    • Events
      • Game - The in-game time of day becomes Equal to 20.00
      • Game - The in-game time of day becomes Equal to 6.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 20.00
        • Then - Actions
          • Destructible - Close GATE
        • Else - Actions
          • Destructible - Open GATE
Check every 0.5s the time of day.
Then check if the time is day or night.
Then open/close ;)

It would be best to avoid those periodic checks whenever possible.
 
Status
Not open for further replies.
Top