Code:
CityFarmWorkersWakeup
Events
Game - The in-game time of day becomes Equal to 6.00
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Set RefPoint = (Random point in FarmerHousing <gen>)
Unit - Create 1 Farm Worker for Player 12 (Brown) at RefPoint facing (Random angle) degrees
Unit Group - Add (Last created unit) to TownColorUnitGroup[1]
Custom script: call RemoveLocation (udg_RefPoint)
Set RefPoint = (Center of FarmPath0 <gen>)
Unit - Order (Last created unit) to Move To (Center of FarmPath0 <gen>)
Custom script: call RemoveLocation (udg_RefPoint)
Wait (Random real number between 1.00 and 4.00) seconds
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Set RefPoint = (Random point in FarmerHousing <gen>)
Unit - Create 1 Farm Child for Player 12 (Brown) at RefPoint facing (Random angle) degrees
Unit Group - Add (Last created unit) to TownColorUnitGroup[1]
Custom script: call RemoveLocation (udg_RefPoint)
Set RefPoint = (Center of FarmPath0 <gen>)
Unit - Order (Last created unit) to Move To (Center of FarmPath0 <gen>)
Custom script: call RemoveLocation (udg_RefPoint)
Wait (Random real number between 1.00 and 4.00) seconds
Needs to create 12 "Farm Worker" units and send each down a path (Plus adding them to a unitgroup so I can track these things) then create 3 "Farm Child" units and send them off to work as well. Sadly these mildly migrant workers refuse to come out to get ready for work in the morning. The trigger seems to not reliably fire off at all. I created test triggers that had alot of the same features and the generic Time of Day events that just ping the map work solidly. When I toss a create unit into the mix, it fails almost everytime.