Hey guys.
I'm making a spell which should add a buff to the enemy target unit, while the casting unit is casting. (Cast time 3 sec.)
- And remove the buff if the unit stops.
(Similar to the hero "Sniper" in DotA)
Problems:
If i cast, and stop the spell instant, the buff wont get off. (the buff comes on to slow)
If the spell is casted, and i stop, the buff gets off. (should stay on, when the spell is casted)
If 2 units target the same enemy unit, and one of them stops, the buff goes off (should stay on if its still targed)
Secondly, if the target unit gets purged, the buff should get off, and the casting unit, should stop.
I'm making a spell which should add a buff to the enemy target unit, while the casting unit is casting. (Cast time 3 sec.)
- And remove the buff if the unit stops.
(Similar to the hero "Sniper" in DotA)
Problems:
If i cast, and stop the spell instant, the buff wont get off. (the buff comes on to slow)
If the spell is casted, and i stop, the buff gets off. (should stay on, when the spell is casted)
If 2 units target the same enemy unit, and one of them stops, the buff goes off (should stay on if its still targed)
Secondly, if the target unit gets purged, the buff should get off, and the casting unit, should stop.
Code:
Andrew Antiair
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Homeseeking Rocket (Andrew Antiair)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) has buff Homeseeking Rocket (Buff) ) Equal to True
Then - Actions
Unit - Remove Homeseeking Rocket (Buff) buff from (Target unit of ability being cast)
Else - Actions
Unit - Order (Casting unit) to Stop
Code:
Andrew Antiair 2
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to Homeseeking Rocket (Andrew Antiair)
Actions
Set AndrewPoint = (Position of (Target unit of ability being cast))
Unit - Create 1 AndrewDummy for (Owner of (Casting unit)) at AndrewPoint facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Undead Banshee - Curse (Target unit of ability being cast)
Code:
Andrew Antiair 3
Events
Unit - A unit Stops casting an ability
Conditions
(Ability being cast) Equal to Homeseeking Rocket (Andrew Antiair)
Actions
Unit - Remove Homeseeking Rocket (Buff) buff from (Target unit of ability being cast)