| This is one way you could do it:
Events
Unit - A unit enters Region 1
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in (Region 1))) Equal to 1
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to 1
Then - Actions
Unit - Order (Entering unit) to Move To (Center of (Region 2))
Else - Actions
Unit - Order (Entering unit) to Move To (Center of (Region 3))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in (Playable map area))) Greater than or equal to 2
Then - Actions
Set Integer_Units = (Number of units in (Units in (Region 1)))
Unit Group - Add all units of (Units in (Region 1)) to UnitGroup_Units
Unit Group - Pick every unit in (Random (Integer_Units - (Integer((((Real(Integer_Units)) x 0.50) + 0.00)))) units from (Units from UnitGroup_Units)) and do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from UnitGroup_Units
Unit - Order (Entering unit) to Move To (Center of (Region 2))
Unit Group - Pick every unit in UnitGroup_Units and do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from UnitGroup_Units
Unit - Order (Entering unit) to Move To (Center of (Region 3))
Else - Actions
Do nothing
If it's a move instantly thing you want, change the Unit - Order to Unit - Move Instantly.
Last edited by Octopor; 02-13-2007 at 06:41 PM.
|