- Joined
- Sep 11, 2011
- Messages
- 1,176
I want to create a spell that throws 3 knife in different angle (the first is Position of the caster towards the target point of ability being cast, and i did the others by add and subtract it by 30.00 degrees).
i'm using Unit Indexer, Carrion Swarm as a base and doing it like this
the problem is, the knives didn't move at all, it stays on the position of the dummy i created. anyone know what the problem is ?
i'm using Unit Indexer, Carrion Swarm as a base and doing it like this
-
Triple Knives
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Carrion Swarm
-
Actions
- Set tempPoint = (Position of (Triggering unit))
- Unit - Create 1 Dummy (1) for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
- Unit Group - Add (Last created unit) to Group
- Set cv = (Custom value of (Last created unit))
- Set CS_Angle1[cv] = ((Angle from (Position of (Last created unit)) to (Target point of ability being cast)) - 30.00)
- Set CS_Angle2[cv] = (Angle from (Position of (Last created unit)) to (Target point of ability being cast))
- Set CS_Angle3[cv] = ((Angle from (Position of (Last created unit)) to (Target point of ability being cast)) + 30.00)
- Set CS_MissileSpeed[cv] = (400.00 x 0.04)
- Set CS_Duration[cv] = 2.00
- Unit - Create 1 Dummy (1) for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
- Set CS_1stDummy[cv] = (Last created unit)
- Unit - Create 1 Dummy (1) for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
- Set CS_2ndDummy[cv] = (Last created unit)
- Unit - Create 1 Dummy (1) for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
- Set CS_3rdDummy[cv] = (Last created unit)
- Custom script: call RemoveLocation(udg_tempPoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (TK Loop <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on TK Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
TK Loop
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Group and do (Actions)
-
Loop - Actions
- Set cv = (Custom value of (Picked unit))
- Set CS_Duration[cv] = (CS_Duration[cv] - 0.04)
- Unit - Move CS_1stDummy[cv] instantly to ((Position of (Picked unit)) offset by CS_MissileSpeed[cv] towards CS_Angle1[cv] degrees)
- Unit - Move CS_2ndDummy[cv] instantly to ((Position of (Picked unit)) offset by CS_MissileSpeed[cv] towards CS_Angle2[cv] degrees)
- Unit - Move CS_3rdDummy[cv] instantly to ((Position of (Picked unit)) offset by CS_MissileSpeed[cv] towards CS_Angle3[cv] degrees)
-
Loop - Actions
-
Unit Group - Pick every unit in Group and do (Actions)
-
Events
Last edited: