- Joined
- Jul 15, 2009
- Messages
- 632
Hello,
I'm working on a item that knocks the caster back (or forward in this case).
Now, the unit starts moving but it never stops, what am I doing wrong?
(I made it so that every player can use it at once, no need to make multiple units use it since it's only for heroes, of which players only have 1)
I'm working on a item that knocks the caster back (or forward in this case).
Now, the unit starts moving but it never stops, what am I doing wrong?
(I made it so that every player can use it at once, no need to make multiple units use it since it's only for heroes, of which players only have 1)
-
Warp
-
Events
-
Unit - A unit Uses an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to Warping Stick
-
-
Actions
-
Set KnockbackAngle[(Player number of (Owner of (Triggering unit)))] = (Facing of (Triggering unit))
-
Set KnockbackDistance[(Player number of (Owner of (Triggering unit)))] = 300.00
-
Set KnockbackEffect[(Player number of (Owner of (Triggering unit)))] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
-
Set KnockbackUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
-
Unit Group - Add (Triggering unit) to KnockbackGroup
-
-
-
KnockbackLoops
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(KnockbackUnit[(Integer A)] is in KnockbackGroup) Equal to True
-
-
Then - Actions
-
Set TempPoint = ((Position of KnockbackUnit[(Integer A)]) offset by 25.00 towards KnockbackAngle[(Integer A)] degrees)
-
Special Effect - Create a special effect at TempPoint using KnockbackEffect[(Integer A)]
-
Special Effect - Destroy (Last created special effect)
-
Unit - Move KnockbackUnit[(Integer A)] instantly to TempPoint
-
Set KnockbackDistance[(Integer A)] = (KnockbackDistance[(Integer A)] - 25.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
KnockbackDistance[(Integer A)] Equal to 0.00
-
-
Then - Actions
-
Unit Group - Remove KnockbackUnit[(Integer A)] from KnockbackGroup
-
Set KnockbackUnit[(Integer A)] = No unit
-
Set KnockbackAngle[(Integer A)] = 0.00
-
Set KnockbackEffect[(Integer A)] = <Empty String>
-
-
Else - Actions
-
-
-
Else - Actions
-
-
Custom script: call RemoveLocation( udg_TempPoint )
-
-
-
-