• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Elevator Trap Trigger Help

Status
Not open for further replies.

Kzl

Kzl

Level 1
Joined
Jun 2, 2008
Messages
5
Hey, I was having trouble with one of my triggers for a map I'm working on:
  • Pitfall 1
    • Events
      • Unit - A unit enters Pitfall 1 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Not equal to Player 9 (Gray)
    • Actions
      • Wait 1.00 seconds
      • Destructible - Close All walls of Elevator (2) 0165 <gen>
      • Destructible - Set height of Elevator (2) 0165 <gen> to 1
      • Wait 1.00 seconds
      • Unit - Kill (Triggering unit)
      • Wait 3.00 seconds
      • Destructible - Set height of Elevator (2) 0165 <gen> to 3
      • Destructible - Open All walls of Elevator (2) 0165 <gen>
This works perfectly, except for one thing: after the unit dies, it would respawn (via a different trigger), but it would immediately die again after respawning. This would continue forever.

Any suggestions?

EDIT: Perhaps I should elaborate as to what this is for. It's essentially a trap, where a unit would enter the region, the elevator walls close, the elevator drops, the unit dies, and the elevator resets. I'd like the unit to only die once though, and not an infinite number of times.
 

Kzl

Kzl

Level 1
Joined
Jun 2, 2008
Messages
5
  • Troll
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Troll Animalist
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Greater than or equal to 50
        • Then - Actions
          • Wait 5.00 seconds
          • Unit - Create 1 Troll Animalist for Player 1 (Red) at (Random point in SW Graveyard <gen>) facing Default building facing degrees
          • Camera - Pan camera for Player 1 (Red) to (Position of (Last created unit)) over 0.50 seconds
          • Unit - Set life of (Last created unit) to (Percentage life of (Random unit from (Units of type Dwarf Warrior)))%
          • Unit - Set mana of (Last created unit) to (Percentage mana of (Random unit from (Units of type Dwarf Warrior)))%
          • Selection - Select (Last created unit) for Player 1 (Red)
          • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
        • Else - Actions
          • Wait 5.00 seconds
          • Unit - Create 1 Troll Animalist for Player 1 (Red) at (Random point in NE Graveyard <gen>) facing Default building facing degrees
          • Camera - Pan camera for Player 1 (Red) to (Position of (Last created unit)) over 0.50 seconds
          • Unit - Set life of (Last created unit) to (Percentage life of (Random unit from (Units of type Dwarf Warrior)))%
          • Unit - Set mana of (Last created unit) to (Percentage mana of (Random unit from (Units of type Dwarf Warrior)))%
          • Selection - Select (Last created unit) for Player 1 (Red)
          • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Other\Awaken\Awaken.mdl
It respawns the unit that died in one of two graveyards with percentage health and mana of the unit that killed it.
 

Kzl

Kzl

Level 1
Joined
Jun 2, 2008
Messages
5
The point of that resurrection Action is that the unit would respawn with however much health and mana the killer had (percentage-wise).
Actually, I figured out a way to fix it, so, case closed I guess.

Thanks anyway. Rep for you.
 
Status
Not open for further replies.
Top