• 🏆 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] "Raise Dead" through triggers?

Status
Not open for further replies.
Level 5
Joined
Jun 5, 2007
Messages
99
I'm working on a large gauntlet, and in that gauntlet, there will be several mobs known as "Armored Necromancers". As they patrol around, if they get within 350 grid points of a dead unit, they will create 4 copies of it. Since they will not use any mana, take the time to cast, etc, I didn't feel the need to create a new spell (nor would I know how).

Therefore, I tried to make a simple trigger, but something is going horribly wrong (it's not even working!).

  • Rez1
    • Events
      • Unit - A unit comes within 350.00 of Armored Necromancer 0037 <gen>
    • Conditions
      • ((Triggering unit) is dead) Equal to True
    • Actions
      • Unit - Create 4 (Unit-type of (Triggering unit)) for Player 4 (Purple) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Remove (Triggering unit) from the game
Can anyone find a problem with it?
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Try this trigger.
It works, but isn't MUI.

  • Rez1
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Position of Armored Necromancer 0037)
      • Set TempGroup = (Units within 350.00 of TempPoint matching (((Matching unit) is dead) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempPoint2 = (Position of (Picked unit))
          • Unit - Create 4 (Unit-type of (Picked unit)) for Player 4 (Purple) at TempPoint2 facing Default building facing degrees
          • Unit - Remove (Picked unit) from the game
          • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Last edited:

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Rez1

Events

Time - Every 0.03 seconds of game time

Conditions
Actions

Set TempPoint = (Position of Armored Necromancer 0037)
Set TempGroup = (Units within 350.00 of TempPoint matching (((Matching unit) is dead) Equal to True))
Unit Group - Pick every unit in TempGroup and do (Actions)

Loop - Actions

Set TempPoint2 = (Position of (Picked unit))
Unit - Create 4 (Unit-type of (Picked unit)) for Player 4 (Purple) at TempPoint2 facing Default building facing degrees
Unit - Remove (Picked unit) from the game

Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call RemoveLocation(udg_TempPoint2)
Custom script: call DestroyGroup(udg_TempGroup)

It leaks ... Call RemoveLocation(udg_TempPoint2) should be in the Pick every unit :)
 
Status
Not open for further replies.
Top