Code:
BattleSetupRound Region 1
Events
Map initialization
Conditions
Actions
Unit Group - Pick every unit in (Units in BattleFieldRegion[1]) and do (Actions)
Loop - Actions
Unit - Pause (Picked unit)
Unit Group - Add (Picked unit) to SetTurnGroup
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in SetTurnGroup) Greater than 1
Then - Actions
Set CounterIndex = 0
Unit Group - Pick every unit in SetTurnGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CounterIndex Equal to 0
Then - Actions
Set CounterIndex = (CounterIndex + 1)
Set UnitSpeed[CounterIndex] = (Picked unit)
Else - Actions
Set CounterIndex = (CounterIndex + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Agility of (Picked unit) (Include bonuses)) Greater than (Agility of UnitSpeed[(CounterIndex - 1)] (Include bonuses))
Then - Actions
Set Filter_unit = UnitSpeed[(CounterIndex - 1)]
Set UnitSpeed[(CounterIndex - 1)] = (Picked unit)
Set UnitSpeed[CounterIndex] = Filter_unit
Else - Actions
Set UnitSpeed[CounterIndex] = (Picked unit)
Else - Actions
For each (Integer A) from 1 to CounterIndex, do (Actions)
Loop - Actions
Game - Display to (All players) the text: (Name of UnitSpeed[CounterIndex])
i got 1 of all human heroes in a region.
and my trigger allways display Mountain king, why? what have i done wrong?