- Joined
- Feb 17, 2018
- Messages
- 115
Hi! I came up with an idea to make a non channeled Tranqulity spell. For that i decided to make a dummy unit that would cast a spell itseld and periodically would be moved to a hero caster. I couldn't use "instatly move to a point" option as it interrupst orders and casts. So I went on with SetUnitX SetUnitY. But the problem is after unit is moved spell remains on the place it was cated on (see screenshot). How do I fix that? How to i make spell follow the dummy unit? Thanks in advance!
also triggers:
also triggers:
-
Tranquility
-

Event
-


Unit - A unit start an effec of a ability
-
-

Conditions
-


(Ability being cast) equals to (Tranqulity)
-
-

Actions
-


Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing degrees
-


Unit - Add Tranqulity (dummy) to (Last created unit)
-


Unit - Set level of Tranqulity (dummy) for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
-


Unit - Order (Last created unit) to Kotg Tranqulity
-


Unit - Add a 10.00 second expiration timer to (Last created unit)
-


Set TQ_Index = (TQ_Index + 1)
-


Set TQ_Caster[TQ_Index] = (Triggering unit)
-


Set TQ_Counter[TQ_Index] = 0.00
-


Set TQ_Dummy[TQ_Index] = (Last created unit)
-


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



If - Conditions
-




TQ_Index equal to 1
-




Then - Action
-





Trigger - Turn on TranqulityLoop <gen>
-
-




Else - Actions
-
-
-
-
-
TranqulityLoop
-

Events
-


Time - Every 0.10 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer TQ_Loop_Integer) from 1 to TQ_Index, do (Actions)
-



Loops - Actions
-




Set TQCasterlocation[TQ_Loop_Integer] = (Position of TQ_Caster[TQ_Loop_Integer])
-




Custom script: call SetUnitX(udg_TQ_Dummy[udg_TQ_Loop_Integer], GetLocationX(udg_TQCasterlocation[udg_TQ_Loop_Integer]))
-




Custom script: call SetUnitY(udg_TQ_Dummy[udg_TQ_Loop_Integer], GetLocationY(udg_TQCasterlocation[udg_TQ_Loop_Integer]))
-




Set TQ_Counter[TQ_Loop_Integer] = (TQ_Counter[TQ_Loop_Integer] + 0.10)
-




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





If - Conditions
-






TQ_Counter[TQ_Loop_Integer] greater or equals to 10.00
-
-





Then - Actions
-






Set TQ_Caster[TQ_Loop_Integer] = TQ_Caster[TQ_Index]
-






Set TQ_Dummy[TQ_Loop_Integer] = TQ_Dummy[TQ_Index]
-






Set TQ_Counter[TQ_Loop_Integer] = TQ_Counter[TQ_Index]
-






Set TQ_Index = (TQ_Index - 1)
-






Set TQ_Loop_Integer = (TQ_Loop_Integer - 1)
-






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







If - Conditions
-








TQ_Index equals 0
-








Then - Actions
-









Trigger - Turn off (This trigger)
-
-








Else - Actions
-
-
-






Else - Actions
-
-
-
-
-
-
