I have two triggers that summons a pattern of flame(in a 8 armed spiral pattern) and moves them to follow my hero. My problem is the variable spinpoints[0] isn't setting it self in the Spin trigger. This means the ability will not do anything the first time and the other will create the flames at the position the flames were moved too. Whats the problem?
and
Code:
Spin
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Spin Storm
Actions
Set cast = (Casting unit)
Set spinpoints[0] = (Position of cast)
Set spinno = 1
For each (Integer A) from 0 to 7, do (Actions)
Loop - Actions
For each (Integer B) from 0 to 5, do (Actions)
Loop - Actions
Set spinpoints[spinno] = (spinpoints[0] offset by (((Real((Integer B))) x 50.00) + 100.00) towards (((Real((Integer A))) x 45.00) + ((Real((Integer B))) x 10.00)) degrees)
Set spinno = (spinno + 1)
Unit - Create 1 SpinUnit for (Owner of cast) at spinpoints[spinno] facing Default building facing degrees
Set spinunits[spinno] = (Last created unit)
Trigger - Turn on spinupdate <gen>
Wait 5.00 game-time seconds
Trigger - Turn off spinupdate <gen>
For each (Integer A) from 1 to 48, do (Actions)
Loop - Actions
Unit - Remove spinunits[(Integer A)] from the game
Code:
SpinMove
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Set spinpoints[0] = (Position of cast)
Set spinno = 1
For each (Integer A) from 0 to 7, do (Actions)
Loop - Actions
For each (Integer B) from 0 to 5, do (Actions)
Loop - Actions
Set spinpoints[spinno] = (spinpoints[0] offset by (((Real((Integer B))) x 50.00) + 100.00) towards (((Real((Integer A))) x 45.00) + ((Real((Integer B))) x 10.00)) degrees)
Unit - Order spinunits[spinno] to Move To spinpoints[spinno]
Set spinno = (spinno + 1)