Asking for help.. again, as usual. Ok so, I was thinking of a spell, which just adds a buff to a unit. If that unit dies, it will explode with a nova like animation (yes the nova is pure animation), and do some base damage + damage based of a % of it's max hit points.
Thats about it, and ofcourse, it does nothing when the unit with the fear buff dies, because nothing I create ever works lol. I came to the obvious conclusion that dead units don't have buffs, which causes my trigger to get stuck somewhere... I think.
P.S.: The search function is so rigged. Half of the topics is called "need help with my spell" or something in that direction, and all that just leads to things I don't need :s .
Code:
NightmareFear Explosion Animation
Events
Unit - A unit Dies
Conditions
Or - Any (Conditions) are true
Conditions
((Dying unit) has buff Fear (level 1)) Equal to True
((Dying unit) has buff Fear (level 2)) Equal to True
((Dying unit) has buff Fear (level 3)) Equal to True
((Dying unit) has buff Fear (level 4)) Equal to True
((Dying unit) has buff Fear (level 5)) Equal to True
Actions
For each (Integer A) from 1 to 9, do (Actions)
Loop - Actions
Unit - Create 1 Casting Dummy for (Owner of Nightmare) at (Position of (Dying unit)) facing Default building facing degrees
Unit - Remove Nova Missiles from (Last created unit)
Unit - Add Fear Explosion to (Last created unit)
Unit - Hide (Last created unit)
Unit - Add a 0.70 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Neutral - Breath Of Frost ((Position of (Dying unit)) offset by 100.00 towards NovaRotationTargetVar degrees)
Set NovaRotationTargetVar = (NovaRotationTargetVar + 40.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) has buff Fear (level 1)) Equal to True
Then - Actions
Unit Group - Pick every unit in (Units within 250.00 of (Position of (Dying unit)) matching ((Owner of (Matching unit)) Equal to Player 12 (Brown))) and do (Actions)
Loop - Actions
Unit - Cause Nightmare to damage (Picked unit), dealing (100.00 + ((Max life of (Dying unit)) / 50.00)) damage of attack type Spells and damage type Normal
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) has buff Fear (level 2)) Equal to True
Then - Actions
Unit Group - Pick every unit in (Units within 250.00 of (Position of (Dying unit)) matching ((Owner of (Matching unit)) Equal to Player 12 (Brown))) and do (Actions)
Loop - Actions
Unit - Cause Nightmare to damage (Picked unit), dealing (150.00 + ((Max life of (Dying unit)) / 25.00)) damage of attack type Spells and damage type Normal
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) has buff Fear (level 3)) Equal to True
Then - Actions
Unit Group - Pick every unit in (Units within 250.00 of (Position of (Dying unit)) matching ((Owner of (Matching unit)) Equal to Player 12 (Brown))) and do (Actions)
Loop - Actions
Unit - Cause Nightmare to damage (Picked unit), dealing (200.00 + ((Max life of (Dying unit)) / 16.66)) damage of attack type Spells and damage type Normal
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) has buff Fear (level 4)) Equal to True
Then - Actions
Unit Group - Pick every unit in (Units within 250.00 of (Position of (Dying unit)) matching ((Owner of (Matching unit)) Equal to Player 12 (Brown))) and do (Actions)
Loop - Actions
Unit - Cause Nightmare to damage (Picked unit), dealing (250.00 + ((Max life of (Dying unit)) / 12.50)) damage of attack type Spells and damage type Normal
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) has buff Fear (level 5)) Equal to True
Then - Actions
Unit Group - Pick every unit in (Units within 250.00 of (Position of (Dying unit)) matching ((Owner of (Matching unit)) Equal to Player 12 (Brown))) and do (Actions)
Loop - Actions
Unit - Cause Nightmare to damage (Picked unit), dealing (300.00 + ((Max life of (Dying unit)) / 10.00)) damage of attack type Spells and damage type Normal
Else - Actions
Do nothing
Thats about it, and ofcourse, it does nothing when the unit with the fear buff dies, because nothing I create ever works lol. I came to the obvious conclusion that dead units don't have buffs, which causes my trigger to get stuck somewhere... I think.
P.S.: The search function is so rigged. Half of the topics is called "need help with my spell" or something in that direction, and all that just leads to things I don't need :s .