- Joined
- Nov 12, 2011
- Messages
- 46
So I am trying to help Hera_ with her map by at least doing the coding for my own hero's skill first then work on the others. but i ran in to a problem with my second skill.
The skill is suppose to knockback the targeted unit. With the code im using it seems to only work the first time and then afterwards it moves the target unit to the center of the map, so can any of you help me?
The skill is suppose to knockback the targeted unit. With the code im using it seems to only work the first time and then afterwards it moves the target unit to the center of the map, so can any of you help me?
-
Savage kick start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Savage Kick [W]
-
Actions
- Set KnockBackTarget = (Target unit of ability being cast)
- Set KnockBackSpeed = 50
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Savage Kick [W] for (Triggering unit)) Equal to 1
-
Then - Actions
- Set KnockBackDistance = 150
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Savage Kick [W] for (Triggering unit)) Equal to 2
-
Then - Actions
- Set KnockBackDistance = 200
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Savage Kick [W] for (Triggering unit)) Equal to 3
-
Then - Actions
- Set KnockBackDistance = 250
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Savage Kick [W] for (Triggering unit)) Equal to 4
-
Then - Actions
- Set KnockBackDistance = 300
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set Temp_Loc1 = (Position of (Triggering unit))
- Set Temp_Loc2 = (Position of KnockBackTarget)
- Set KnockBackAngle = (Integer((Angle from Temp_Loc1 to Temp_Loc2)))
- Custom script: call RemoveLocation(udg_Temp_Loc1)
- Custom script: call RemoveLocation(udg_Temp_Loc2)
- Trigger - Turn on Savage Kick <gen>
-
Events
-
Savage Kick
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Temp_Loc1 = (Position of KnockBackTarget)
- Set Temp_Loc2 = (Temp_Loc1 offset by (Real(KnockBackSpeed)) towards (Real(KnockBackAngle)) degrees)
- Unit - Move KnockBackTarget instantly to Temp_Loc2
- Custom script: call RemoveLocation(udg_Temp_Loc1)
- Custom script: call RemoveLocation(udg_Temp_Loc2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- KnockBackDistance Less than or equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
-
Else - Actions
- Set KnockBackDistance = (KnockBackDistance - KnockBackSpeed)
-
If - Conditions
-
Events
Last edited: