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

[Trigger] Remove Events

Status
Not open for further replies.
Level 19
Joined
Sep 4, 2007
Messages
2,826
Does anyone know how to remove events? The problem is that once I've added an event to a trigger I can't remove it... Can someone help me?
  • Trigger - Add to Kill Falling Units <gen> the event (Unit - A unit enters RampRegion[RampValue])
 
Level 19
Joined
Sep 4, 2007
Messages
2,826
I'm working on a small minimap and every 3 seconds a ramp falls down to a lava flood. The problem is how to make the area hazard for entering units so I tried adding events to the second trigger but when restarting the game I am unable to remove these events... Does anyone know how I can solve this problem?
  • Destroy Ramps
    • Events
    • Conditions
    • Actions
      • Set RampValue = (Random integer number between 1 and 49)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current life of Ramps[RampValue]) Equal to 0.00
        • Then - Actions
          • Destructible - Set height of Ramps[RampValue] to 3
          • Wait 2.00 seconds
          • Set Leaderboard_Ramps_Destroyed = (Leaderboard_Ramps_Destroyed - 1)
          • Leaderboard - Change the value for Neutral Hostile in (Last created leaderboard) to Leaderboard_Ramps_Destroyed
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in RampRegion[RampValue]) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
              • Set TempPoint = (Position of (Picked unit))
              • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation( udg_TempPoint )
          • [COLOR="Red"]Trigger - Add to Kill Falling Units <gen> the event (Unit - A unit enters RampRegion[RampValue])[/COLOR]
          • Destructible - Set height of Ramps[RampValue] to 1
          • Destructible - Set life of Ramps[RampValue] to 50.00
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Trigger - Run (This trigger) (checking conditions)
The first trigger adds a event to the second trigger.
  • Kill Falling Units
    • Events
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Water Elemental (Level 1)
    • Actions
      • Unit - Kill (Entering unit)
      • Set TempPoint = (Position of (Dying unit))
      • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
      • Special Effect - Destroy (Last created special effect)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Just put this

  • Untitled Trigger 005
    • Events
      • Unit - A unit enters yourRegion
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Boolean Equal to True
        • Then - Actions
          • Unit - Kill (Triggering unit)
        • Else - Actions

And activate/deactivate the boolean whenever it is needed.
 
Status
Not open for further replies.
Top