
Originally Posted by
Gaius'TableScrap
declare_counter loop
set_counter loop 0
monitor_event FactionTurnStart FactionType egypt
and not FactionIsLocal
console_command auto_win attacker
end_monitor
while I_CompareCounter loop = 0
end_while
I'm not a big dog, but I can give you my 2 cents.
For me one possible problem is that the script has to monitor one event, happening in one given moment, but at that very moment there is no battle to fight.
The possible solution for this might be to monitor a general condition, but the exact syntax would depend on your idea about who/when/why the attacker must win a battle in the turn of egypt, as an AI faction.
Just to test the command, you could try something like this:
Code:
script
declare_counter loop
declare_counter egypt_turn
set_counter loop 0
set_counter egypt_turn 0
monitor_event FactionTurnStart FactionType egypt
and not FactionIsLocal
set_counter egypt_turn 1
terminate_monitor
end_monitor
monitor_conditions I_CompareCounter egypt_turn = 1
console_command auto_win attacker
terminate_monitor
end_monitor
monitor_event FactionTurnEnd FactionType egypt
and not FactionIsLocal
set_counter egypt_turn 0
terminate_monitor
end_monitor
while I_CompareCounter loop = 0
end_while
end_script
The idea (as you can see) is to trigger the condition only during the egypt turn. The auto_win command shouldn't be operative during the rest of the turns.
In case it works (I doubt it, but who knows
), post it here.