• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

how to open or close a gate in certain time?

Status
Not open for further replies.
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.
Back
Top