• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Spell] Total Destruction

Status
Not open for further replies.
Level 6
Joined
Sep 19, 2006
Messages
191
  • Total Destruction armor raising
    • Events
    • Conditions
      • (Level of Total Destruction for (Summoned unit)) Greater than 0
    • Actions
      • Set SpiritoftheFallen = (Summoned unit)
      • Set DamagingChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamagingChance Less than or equal to 50
        • Then - Actions
          • Unit - Add Armor Raise (+4) to (Summoned unit)
          • Special Effect - Create a special effect attached to the overhead of (Summoned unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilMissile.mdl
          • Wait 5.00 seconds
          • Unit - Remove Armor Raise (+4) from (Summoned unit)
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
This gives the Spirit of the Fallen 4 armor for 5 seconds.
Since the Spirit of the Fallen is a unit summoned by the Blademaster, I specified at the variable above.
This doesn't work. I'm pretty sure it's some flaw I can't notice. Can anyone help me with this code?
 
After the Wait action, you still reffer to that unit as to summoned unit, which is an event response.

Event responses don't work after a wait action, use the unit's variable (SpiritoftheFallen) to refer to it instead.
 
After the Wait action, you still reffer to that unit as to summoned unit, which is an event response.

Event responses don't work after a wait action, use the unit's variable (SpiritoftheFallen) to refer to it instead.
Some event response work after wait (there was a thread about all this stuff, can't recall right now). Using the variable guaranteed a bug if there's more than one summon activate the trigger between the wait phase since it's a global. You need to either make it local or shadow it.

***

The problem is the trigger lacks an event. In this case, the even would be A unit is summoned or something around that line.
 
Another little problem might be that you want to destroy the last created special effect.
Generally it is a good idea to reduce map lag but you should store the effect in a variable if you create more special effects. (it's like "Summoned Unit" saved in a global variable that can be changed when the event raises another time)

Apart from that smaller problem it is like the posts above me said: an event might be a good idea.
 
For event, please use Generic - when a unit is summoned.
Mistake Highlight -
(Level of Total Destruction for (Summoned unit)) Greater than 0 - Error is detected.
Correction -
(Level of Total Destruction for (Summoning unit)) Greater than 0 - You are checking for summoner not summoned minion.
 
Last edited:
Well, the spell does its job when the Blademaster actually summons the Spirit of the Fallen. Thanks, Acutesharpness!
 
Status
Not open for further replies.
Back
Top