Quote Originally Posted by Ian Altano
script

monitor_event FactionTurnStart FactionType slave
and I_TurnNumber = 2

if spawn_armyA=0

spawn_army
faction macedon
character Alexander, named character, command 9, influence 9, management 9, subterfuge 0, age 28, , x 104, y 67
unit levy pikemen, exp 5 armour 0 weapon_lvl 2
unit levy pikemen, exp 5 armour 0 weapon_lvl 2
unit levy pikemen, exp 5 armour 0 weapon_lvl 2
unit levy pikemen, exp 5 armour 0 weapon_lvl 2
unit levy pikemen, exp 5 armour 0 weapon_lvl 2

set_counter spawn_armyA 1
end_if


terminate_monitor
end_monitor
end_script
Some points:

- The correct synthax of the spawn_army comand is:

spawn_army
faction macedon
character Alexander, named character, command 9, influence 9, management 9, subterfuge 0, age 28, , x 104, y 67
unit levy pikemen, soldiers 80 exp 5 armour 0 weapon_lvl 2
unit levy pikemen, soldiers 80 exp 5 armour 0 weapon_lvl 2
unit levy pikemen, soldiers 80 exp 5 armour 0 weapon_lvl 2
unit levy pikemen, soldiers 80 exp 5 armour 0 weapon_lvl 2
unit levy pikemen, soldiers 80 exp 5 armour 0 weapon_lvl 2
end


- Which type of script is this?
If it is a background script I think you need to include some loop. If not the script will be read and, as the event doesn't happen, it will be ignored.
The simplest way is to put this piece of code before the end of the script:

while I_CompareCounter loop = 0
end_while

Another method is to launch the script as a show_me script with the trigger (event) in export_descr_advice. In that case you need only the spawn_army code in the script.

Good luck!