• 🏆 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!

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