• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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