- Joined
- Jul 24, 2009
- Messages
- 5,630
hello everyone i am ghost thruster i am very new to forums and would like to recieve help on my trigger. i made a custom squad system but it did not work plz help i will give credits in my map Ultimate Hero Arena Matrix v45.3a (it is still in the alpha but i will finished it)
ive narrowed the problem down to one action, which seems to not be work:
ive narrowed the problem down to one action, which seems to not be work:
-
training
-
Events
-
Unit - A unit Finishes training a unit
-
-
Conditions
-
Actions
-
For each (Integer index[1]) from 1 to squad_types, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to squad_dummy[index[1]]
-
-
Then - Actions
-
Trigger - Turn on numbers <gen>
-
-------- indexing for the number of squads on field --------
-
Set squads_index1 = (squads_index1 + 1)
-
Set squads_index2 = (squads_index2 + 1)
-
Set squads_on[squads_index1] = True
-
Set squads_total[squads_index1] = squad_no[index[1]]
-
-------- making the new squad --------
-
Set point[1] = (Position of (Trained unit))
-
Set point[2] = (Rally-Point of (Triggering unit) as a point)
-
Unit - Remove (Trained unit) from the game
-
-------- beware, will not work if squad_no[Integer A] is > 12 --------
-
For each (Integer index[2]) from 1 to squad_no[index[1]], do (Actions)
-
Loop - Actions
-
Unit - Create 1 squad_unit[index[1]] for (Owner of (Trained unit)) at point[1] facing Default building facing degrees
-
-------- the below action fucks up - somehow after squads_squad[1], there won't be a squads_squad[2] --------
-
Unit Group - Add (Last created unit) to squads_squad[squads_index1]
-
-
-
Unit Group - Order squads_squad[squads_index1] to Attack-Move To point[2]
-
Set squads_lead[squads_index1] = (Last created unit)
-
Unit - Add Squad Capn to (Last created unit)
-
Custom script: call RemoveLocation(udg_point[1])
-
Custom script: call RemoveLocation(udg_point[2])
-
Custom script: exitwhen 0 == 0
-
-
Else - Actions
-
-
-
-
-