i made a soul based hero for my foot wars map. hes not that complicated but i noticed that he had no offensive spells exept one that killed a unit and subtracted the units health from the heros. but i want to make a spell (this is the easy part) that kills a non hero unit and then (this is the part i cant get) damages everything around the killed unit a percentage of the killed units hp. each level should go up by 10% starting at 30%. im thinking "for each varable a 1-3 do actions" but i dont know how to use this. any help would be appreciated and credited. thx---AlphaChicken
Events A unit begins casting a spell Conditions Ability being cast equal to X Actions If then Else Multiple Actions If Target Units of Ability being Cast is dead Equal to True Then Pick All units within 100x Level of Ability being Cast and Have Casting Unit damage 20x Level of Ability being cast of spell damage Create SFX Destroy SFX Else- Do Nothing
Two thing... First change the event to "Unit Starts the Effect of an Ability" to ensure that the caster actually casts it. Secondly, wait about 0.40 seconds at the beginning because target may not die instantly. If the trigger works even without wait, it's ok. But the event is necessary how I said in order to actually work.
it works with "unit begins casting a spell" too, but then it's buggy
btw, he wanted a % damage of the unit's hp, not a certain damage amount. so use:
pick every unit in range (100*(levelofability(yourability)) matching condition((owner of (picked unit) is enemy of (owner of casting unit) = true) and do:
set life (percentage) of (picked unit) to (life of picked unit) - (10*(levelofability(yourability))
Heh... Didn't notice that. And I usually tend to do spells as less buggy as possible . There are abuser like Shiggy (I saw a post of his telling it...) who can find bugs easily. So, it's best not to let these guys have fun by finding bugs in your spell.
Ok, for Chicken, the bugs is that the trigger would begin even if the player would just click over the target but not cast it already. So if you move immediately to another point or something the spell takes effect and you no longer lose MP. VERY buggy...