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

Reset trigger?

Status
Not open for further replies.
Level 7
Joined
Jun 15, 2010
Messages
218
How do i reset a trigger? It must stop the current actions that its doing and wait for the event to do actions over again.
 
Level 7
Joined
Jun 15, 2010
Messages
218
First trigger is:

Enter Region 6
Events
Unit - A unit enters Spawn Zone Orc Right 2 <gen>
Conditions
Actions
Unit - Create 1 Troll Headhunter for Player 1 (Red) at (Center of Spawn Zone Orc Right 2 <gen>) facing Default building facing degrees
Wait 5.00 seconds
Unit - Create 1 Troll Headhunter for Player 1 (Red) at (Center of Spawn Zone Orc Right 2 <gen>) facing Default building facing degrees
Wait 5.00 seconds
Unit - Create 1 Troll Headhunter for Player 1 (Red) at (Center of Spawn Zone Orc Right 2 <gen>) facing Default building facing degrees

----------------------------------------------------------
second trigger:

Leave Region 6
Events
Unit - A unit leaves Spawn Zone Orc Right 2 <gen>
Conditions
Actions
Trigger - Turn off Enter Region 6 <gen>
Wait 0.20 seconds
Trigger - Turn on Enter Region 6 <gen>


--------------------------------------------------

The bug is now that if a units enters it then leaves it and enters it again within 10 seconds, then the taurens will spawn dubbel as fast.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Enter Region 6
    • Events
      • Unit - A unit enters Spawn Zone Orc Right 2 <gen>
    • Conditions
    • Actions
      • Unit - Create 1 Troll Headhunter for Player 1 (Red) at (Center of Spawn Zone Orc Right 2 <gen>) facing Default building facing degrees
      • Wait 5.00 seconds
      • Unit - Create 1 Troll Headhunter for Player 1 (Red) at (Center of Spawn Zone Orc Right 2 <gen>) facing Default building facing degrees
      • Wait 5.00 seconds
      • Unit - Create 1 Troll Headhunter for Player 1 (Red) at (Center of Spawn Zone Orc Right 2 <gen>) facing Default building facing degrees
  • Leave Region 6
    • Events
      • Unit - A unit leaves Spawn Zone Orc Right 2 <gen>
    • Conditions
    • Actions
      • Trigger - Turn off Enter Region 6 <gen>
      • Wait 0.20 seconds
      • Trigger - Turn on Enter Region 6 <gen>
  • Untitled Trigger 011
    • Events
      • Unit - A unit enters Region 003 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Footman
      • ^without this the created units will trigger the event^
    • Actions
      • Set boolean = False
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 003 <gen>) facing Default building facing degrees
      • If (boolean Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 2.00 seconds
      • If (boolean Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 003 <gen>) facing Default building facing degrees
      • Wait 2.00 seconds
      • If (boolean Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 003 <gen>) facing Default building facing degrees

  • Untitled Trigger 011 Copy
    • Events
      • Unit - A unit leaves Region 003 <gen>
    • Conditions
    • Actions
      • Trigger - Turn off Untitled Trigger 011 <gen>
      • Set boolean = True
      • Wait 1.00 seconds
      • Trigger - Turn on Untitled Trigger 011 <gen>
My first boolean check is useless in this case, since it will fail always. I left it there so you can move the boolean = false if you want or need to.

Read this: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Status
Not open for further replies.
Top