An event monitor line must always contain an event followed by at least one condition. The simplest condition is TrueCondition, so you might begin with:
Code:
monitor_event UnitTrained TrueCondition
(spawn)
end_monitor
This will spawn your army when any unit is trained anywhere on the map. This isn't what you want, so you want to make your first condition more restrictive: I think you want to spawn when a unit of Hastati is trained so:
Code:
monitor_event UnitTrained UnitType roman hastati
(spawn)
end_monitor
It looks like you'd also like to restrict the spawn to when the Hastati are trained in the city of Arretium and if the player is the Julii. After the first condition, all the rest must be added with an "and", so:
Code:
monitor_event UnitTrained UnitType roman hastati
and SettlementName Arretium
and FactionType romans_julii
and FactionIsLocal
(spawn)
end_monitor
Some time ago I did something similar and my code looked very much like this.
Bookmarks