Hey all, im working on a spell just for fun and I cant seem to get it to work properly.
What I want is for all enemy units to slowly slide towards the center of a point. In addition, while the units are sliding, the player is able to move the unit away from the center.
Here is what I have so far. Its just the basic trigger:
Oh and one last thing. I thought it would be neet to have the chain lightining effect on all the units sliding. How would I go about that? That is, how would the effect be on every unit that enters the area and then goes away if a unit is able to escape?
thank you for your help!
What I want is for all enemy units to slowly slide towards the center of a point. In addition, while the units are sliding, the player is able to move the unit away from the center.
Here is what I have so far. Its just the basic trigger:
-
Time - Every 0.04 seconds of game time
-
Actions
-
Set Temp_Point[1] = (Position of Thunder Strike 0051 <gen>)
-
Set Temp_Group[1] = (Units within 1000.00 of Temp_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Owner of (Matching unit)) is an enemy of (Owner of Dummy Unit 0002 <gen>)) Equal to True) and (((Matching unit) is alive) Equal to True))))
-
Unit Group - Pick every unit in Temp_Group[1] and do (Actions)
-
Loop - Actions
-
Custom script: call RemoveLocation(udg_Temp_Point[1])
-
Set Temp_Point[1] = (Position of Thunder Strike 0051 <gen>)
-
Set Temp_Point[2] = (Position of (Picked unit))
-
Set Temp_Point[3] = (Temp_Point[2] offset by 5.50 towards (Angle from Temp_Point[2] to Temp_Point[1]) degrees)
-
Unit - Move (Picked unit) instantly to Temp_Point[3]
-
-
-
Custom script: call DestroyGroup(udg_Temp_Group[1])
-
Custom script: call RemoveLocation(udg_Temp_Point[1])
-
Custom script: call RemoveLocation(udg_Temp_Point[2])
-
Custom script: call RemoveLocation(udg_Temp_Point[3])
-
Oh and one last thing. I thought it would be neet to have the chain lightining effect on all the units sliding. How would I go about that? That is, how would the effect be on every unit that enters the area and then goes away if a unit is able to escape?
thank you for your help!