Hello guys =D
Can you help me with this?
I'm having trouble with this spell:
Lightning Shield. It is supposed to push every melee unit that atttack the unit with the shield. However, somehow the melee attacker is not being pushed.
Can you help me with this?
I'm having trouble with this spell:
Lightning Shield. It is supposed to push every melee unit that atttack the unit with the shield. However, somehow the melee attacker is not being pushed.
Code:
Lightning Shield New
Events
Unit - A unit Is attacked
Conditions
((Triggering unit) has buff (Thorde) Dummy ) Equal to (==) True
Actions
-------- This set the main variables: points; units; skill levels. --------
Set PushRange[1] = -175.00
Set PushRange[2] = -225.00
Set PushRange[3] = -275.00
Set PushRange[4] = -325.00
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Attacker is A melee attacker) Equal to (==) True
Then - Actions
Set Attacker = (Attacking unit)
Set Victim = (Triggering unit)
Set TempPoint = (Position of Attacker)
-------- This choses wich push level will be taken. --------
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Victim has buff (Thorde)) Equal to (==) True
Then - Actions
Set TempInteger = 1
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Victim has buff (Thorde) 2 ) Equal to (==) True
Then - Actions
Set TempInteger = 2
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Victim has buff (Thorde) 3 ) Equal to (==) True
Then - Actions
Set TempInteger = 3
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Victim has buff (Thorde) 4 ) Equal to (==) True
Then - Actions
Set TempInteger = 1
Else - Actions
-------- This pushes the unit --------
Set TempPoint2 = (TempPoint offset by PushRange[TempInteger] towards (Facing of Attacker) degrees)
Unit - Move Attacker instantly to TempPoint2
Point - Remove TempPoint
Point - Remove TempPoint2
Else - Actions