ok well im trying to make a spell for my cinematic where units(my effect) are created around the caster and they orbit around the caster.
but what is happaning after the units are created they just all go to the one spot.
what do i have to do so that the units rotate around the caster and not all move to the one spot
i want the units to rotate around the caster
----x----
-x--o--x-
----x----
but they end up like this all on top of each other
----x----
----o----
---------
x - effect units
o - caster
here are my triggers
but what is happaning after the units are created they just all go to the one spot.
what do i have to do so that the units rotate around the caster and not all move to the one spot
i want the units to rotate around the caster
----x----
-x--o--x-
----x----
but they end up like this all on top of each other
----x----
----o----
---------
x - effect units
o - caster
here are my triggers
Trigger:
- effect spin spin
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to effect 3
- Actions
- Set center = (Position of (Triggering unit))
- Set caster = (Triggering unit)
- For each (Integer A) from 1 to 40, do (Actions)
- Loop - Actions
- Unit - Create 1 dummy missle 3 for (Owner of (Triggering unit)) at (center offset by 400.00 towards ((Real((Integer A))) x (360.00 / 40.00)) degrees) facing (Position of (Triggering unit))
- Unit Group - Add (Last created unit) to spingroup
- Loop - Actions
- Trigger - Turn on effect spin <gen>
- Wait 5.00 seconds
- Unit Group - Pick every unit in spingroup and do (Unit - Remove (Picked unit) from the game)
- Unit Group - Pick every unit in spingroup and do (Unit - Remove (Picked unit) from the game)
- Trigger - Turn off effect spin <gen>
- Events
Trigger:
- effect spin
- Events
- Time - Every 0.40 seconds of game time
- Conditions
- Actions
- Set spincenter = (Position of caster)
- Unit Group - Pick every unit in spingroup and do (Actions)
- Loop - Actions
- Unit - Move (Picked unit) instantly to (spincenter offset by (Distance between spincenter and (Position of (Picked unit))) towards ((Distance between spincenter and (Position of (Picked unit))) + 20.00) degrees), facing spincenter
- Loop - Actions
- Custom script: call RemoveLocation (udg_spincenter)
- Events