I made this auto-spawn trigger:
Second Problem:
Thanks in advance!
-
Footman
-
Events
- Time - SpawnTimer expires
- Conditions
-
Actions
- Set VariableSet SpawnUnitGroup = (Units of type Barracks)
-
Unit Group - Pick every unit in SpawnUnitGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) Food used) Less than ((Owner of (Picked unit)) Food cap)
-
Then - Actions
- Set VariableSet TempPoint = (Position of (Picked unit))
- Unit - Create 1 Footman for (Owner of (Picked unit)) at TempPoint facing Default building facing degrees
- Unit - Order (Last created unit) to Attack-Move To (Random point in Region 001 <gen>)
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call DestroyGroup (udg_SpawnUnitGroup)
-
Events
Second Problem:
-
uncontrollable
-
Events
- Unit - A unit Is issued an order targeting a point
- Unit - A unit Is issued an order targeting an object
- Unit - A unit Is issued an order with no target
-
Conditions
- (Unit-type of (Target unit of issued order)) Not equal to Peasant
-
Actions
- Trigger - Turn off (This trigger)
- Unit - Order (Triggering unit) to Attack-Move To (Center of Region 001 <gen>)
- Trigger - Turn on (This trigger)
-
Events
Thanks in advance!