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

Disabling Triggers After Set amount of Time

Status
Not open for further replies.
Level 2
Joined
Dec 31, 2007
Messages
11
I have one trigger which kills a unit that enters a specific region.

What I want to do is disable that trigger after a set amount of time, or let units run through that region again.

Would I need another trigger to disable it? Or can I disable it within that trigger after.
 
You can do this:
  • Trigger
  • Events
    • Unit - A unit enters Region 000 <gen>
  • Conditions
  • Actions
    • Trigger - Turn off (This trigger)
    • Unit - Kill (Triggering unit)
    • Trigger - Turn on Trigger1 <gen>
  • Trigger1
  • Events
    • Time - Every 1.00 seconds of game-time
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (TimeLeft) Less than 10
      • Then - Actions
        • Set TimeLeft = (TimeLeft + 1)
      • Else - Actions
        • Trigger - Turn off (This trigger)
        • Trigger - Turn on Trigger <gen>
TimeLeft is an Integer variable.
 
Status
Not open for further replies.
Back
Top