Has anybody managed to use spawn_army in an advisor script?
When I try to do it the script fails to parse with an "on an invalid tile" log error as soon as the advisor appears, disabling the "show me how" button in the process.
Needless to say the tile is valid. I saw someone mention this in passing in another thread (Germanicu5 I think), suspecting that the script parser might be checking coordinates against some 'base' map instead of the actual map. I tried using some valid M2TW and RTW coordinates as well but it didn't help.
It is strange behaviour, the fact that the parser is checking the coordinates (when the script is loaded). campaign_script does not behave this way.
What's the script and which line is causing the problems?
Under the patronage of Roman_Man#3, Patron of Ishan Click for my tools and tutorials
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein
Here is an example, whittled down to the bare essentials...
Code:
script
;close advisor
select_ui_element advisor_dismiss_button
simulate_mouse_click lclick_up
while I_AdvisorVisible
end_while
suspend_unscripted_advice true
declare_show_me
spawn_army
faction england
character random_name, named character, age 18, x 96, y 145
unit Peasants exp 0 armour 0 weapon_lvl 0
end
end_script
Advisor triggers etc...
Spoiler Alert, click show to read:
Triggered by clicking the advice button on a unit info scroll.
...and commenting out the pre-existing trigger that's using "Condition ScrollAdviceRequested unit_info_scroll"
export_advice.txt
Code:
{bgs_Text_01_Title}Bodyguard Switcher
{bgs_Text_01_Text1}Click the "Show me how" button to begin...
Error:
Code:
14:02:19.328 [game.script] [error] Script parsing error at line 14, column 65 in mods/SpawnPool/data/scripts/show_me/BodyguardSwitcher.txt
Character 'random_name' is placed on an invalid tile.
If I comment out the spawn_army block and put in "add_money england 10000" then no problem: the "show me how" button is now enabled and money is added. So it isn't a problem with the triggers, or anything else in the script.
I also tried with a 'complete' character line, in case it was expecting RTW-like usage...
Code:
character random_name, named character, command 0, influence 0, management 0, age 40, , x 96, y 145
...with and without that 'empty' extra comma. Always the same result.
EDIT: this is Kingdoms by the way.
Last edited by Withwnar; October 23, 2011 at 01:25 AM.