I have been trying to make a background script to spawn a legion when you train a designated legions unit, but to no avail. I managed to get show_me scripts working, but no spawn_army for either show_me or background.
Code:
script
declare_counter loop
set_counter loop 0
monitor_event UnitTrained FactionIsLocal Arretium roman_hastati
spawn_army
faction romans_julii
character Flavius Julius, general, command 0, influence 0, management 0, subterfuge 0, age 20, x 89, y 80
unit roman generals guard cavalry, soldiers 20 exp 9 armour 1 weapon_lvl 0
unit roman legionary first cohort ii, soldiers 40 exp 0 armour 0 weapon_lvl 0
unit roman legionary cohort ii, soldiers 60 exp 0 armour 0 weapon_lvl 0
unit roman praetorian cohort i, soldiers 60 exp 0 armour 0 weapon_lvl 0
end
end_monitor
while I_CompareCounter loop = 0
end_while
end_script
That is my background script. I assumed that is the only thing you need for a background script. As you can see, it was only a test with units, but it CTDs with no show_err message.
Any help would be appreciated,
RM3
Bookmarks