- Joined
- Oct 25, 2009
- Messages
- 996
i have a problem with spell,what happen to this spell?If i cast,the target unit will keep moving...
-
FM Cast
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Force Move
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




FM_Index1 Equal to 0
-
-



Then - Actions
-




Trigger - Turn on FM Loop <gen>
-
-



Else - Actions
-
-


Set FM_Index1 = (FM_Index1 + 1)
-


Set FM_Index2 = (FM_Index2 + 1)
-


Set FM_Target[FM_Index2] = (Target unit of ability being cast)
-


Set FM_Boolean[FM_Index2] = True
-


Set FM_Point1[FM_Index2] = (Position of FM_Target[FM_Index2])
-


Set FM_Point2[FM_Index2] = ((Position of FM_Target[FM_Index2]) offset by 600.00 towards (Facing of FM_Target[FM_Index2]) degrees)
-


Set FM_MaxDistance[FM_Index2] = (Distance between FM_Point1[FM_Index2] and FM_Point2[FM_Index2])
-


Custom script: call RemoveLocation(udg_FM_Point1[udg_FM_Index2])
-


Custom script: call RemoveLocation(udg_FM_Point2[udg_FM_Index2])
-
-
-
FM Loop
-

Events
-


Time - Every 0.02 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer FM_IndexLoop) from 1 to FM_Index2, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






FM_Boolean[FM_IndexLoop] Equal to True
-
-





Then - Actions
-






Set FM_Point1[FM_IndexLoop] = (Position of FM_Target[FM_IndexLoop])
-






Set FM_Point2[FM_IndexLoop] = ((Position of FM_Target[FM_IndexLoop]) offset by 600.00 towards (Facing of FM_Target[FM_IndexLoop]) degrees)
-






Set FM_MaxDistance[FM_IndexLoop] = (Distance between FM_Point1[FM_IndexLoop] and FM_Point2[FM_IndexLoop])
-






Unit - Move FM_Target[FM_IndexLoop] instantly to ((Position of FM_Target[FM_IndexLoop]) offset by 15.00 towards (Facing of FM_Target[FM_IndexLoop]) degrees)
-






Special Effect - Create a special effect at (Position of FM_Target[FM_IndexLoop]) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
-






Special Effect - Destroy (Last created special effect)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








FM_MaxDistance[FM_IndexLoop] Less than or equal to 100.00
-
-







Then - Actions
-








Set FM_Index1 = (FM_Index1 - 1)
-
-







Else - Actions
-
-






Custom script: call RemoveLocation(udg_FM_Point2[udg_FM_IndexLoop])
-






Custom script: call RemoveLocation(udg_FM_Point1[udg_FM_IndexLoop])
-
-





Else - Actions
-
-
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




FM_Index1 Equal to 0
-
-



Then - Actions
-




Set FM_Index2 = 0
-




Set FM_Boolean[FM_IndexLoop] = False
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-
Last edited:






