An aura that raises zombies

Status
Not open for further replies.
You can use any aura to do the buff, but you need triggers to raise the zombies. Just change the targets allowed to both friend and enemy.

  • Raise Dead Aura
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff Raise Dead (Aura)) Equal to True
    • Actions
      • -------- Get caster --------
      • Set VariableSet TempLoc = (Position of (Triggering unit))
      • Set VariableSet TempGroup = (Units within 600.00 of TempLoc matching ((Unit-type of (Matching unit)) Equal to Necromancer).)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • -------- Set caster --------
              • Set VariableSet RaiseDead_Caster = (Picked unit)
              • -------- Get ability level --------
              • Set VariableSet RaiseDead_Level = (Level of Raise Dead (Aura) for RaiseDead_Caster)
              • -------- This quick draft does not do anything with the ability level, but you can use it --------
              • -------- Create units --------
              • Unit - Create 1 Zombie for (Owner of RaiseDead_Caster) at TempLoc facing Default building facing degrees
              • -------- Clean up --------
              • Custom script: call DestroyGroup (udg_TempGroup)
              • Custom script: call RemoveLocation (udg_TempLoc)
            • Else - Actions
 
Unfortunately, you cannot detect buffs when a unit dies, because all buffs are removed from a unit BEFORE the Event "A unit Dies" happens. At least this was the case last time I tried doing something like this.

Solutions:
Use a Damage Engine to detect when a unit takes lethal damage.
Trigger the Aura yourself using a periodic interval and unit groups. A unit dies -> if unit is in RaiseDeadUnitGroup = True -> Do stuff.
 
Unfortunately, you cannot detect buffs when a unit dies, because all buffs are removed from a unit BEFORE the Event "A unit Dies" happens. At least this was the case last time I tried doing something like this.

Oh. Sorry my bad, didn't know :)
 
Status
Not open for further replies.
Back
Top