I know, that's why they are terminated once the counter becomes non-zero and they are invoked...
Or did you mean something else?
Adding a thing about condition monitors and counters, the I_CompareCounter can be placed in an if just after the monitor. Much neater than using two monitors,a nd much simpler, too. Prolly that's why I didn't think of it earlier.
Code:monitor_conditions condition if I_CompareCounter stuff end_if end_monitor
I am trying to test the value of a character's trait during a turn and I had hoped that the following would work:
script
But it does notCode:console_command give_trait Barrivendos GoodCommander monitor_conditions not I_CharacterSelected Barrivendos and Trait GoodCommander >= 1 console_command give_trait Barrivendos GoodAttacker terminate_monitor end_monitor end_scriptCan anyone see what is wrong?
Barrivendos does get the GoodCommander trait which should have a value of 1. Then the not I_CharacterSelected Barrivendos should put the focus on the character which then allows testing the value of the GoodCommander trait. Or doesn't it work like that?
Any help would be greatly appreciated!
What you need to get the Trait condition work is an exported character_record, and condition monitors don't export values; you'll need an event monitor, and convenient events to do that are far and few between.
I have a question regarding scripts.
I'm trying to get a show_me script to run from a background script, but it doesn't seem to be working. This is similar to the Client Kingdoms mod implemented into the TFT mod. The background script works fine and all other functions within it work as intended. Here is the background script section that is supposed to start the show_me script:
This is just temporary until I can get it working - then I'll tweak the costs and add a RandomPercent. Here is the advice thread it refers to:Code:monitor_event SettlementTurnStart SettlementName Rome and SettlementIsLocal and Treasury > 5000 advance_advice_thread Recruit_Legion_Thread end_monitor
And yes, I have set up the text. Finally, here is the whole show_me script:Code:AdviceThread Recruit_Legion_Thread GameArea Campaign Item Recruit_Legion Uninhibitable Verbosity 0 Threshold 1 Attitude Normal Presentation Default Title Recruit_Legion_Title Script scripts\show_me\recruit_roman_legion.txt Text Recruit_Legion_Text1
Can anyone see what I'm doing wrong here? I've tried changing it so that the script runs when Rome is selected using I_SettlementSelected SettlementName Rome but no dice...Code:script console_command create_unit Rome "roman hastati" 2 console_command create_unit Rome "roman princeps" 2 console_command create_unit Rome "roman velite" 2 console_command create_unit Rome "roman Triarii" 1 console_command create_unit Rome "roman light cavalry" 1 console_command add_money -5000 console_command add_population Rome -1210 select_ui_element advisor_dismiss_button simulate_mouse_click lclick_down simulate_mouse_click lclick_up terminate_script end_script
Well, perhaps it's a silly answer, but the first possible mistake is "roman Triarii" instead of "roman triarii".
The second point is that I cannot see the need for a background script only for this purpose. It would be enough with a normal trigger in export_descr_advice, as in Client Kingdoms mod.
Third point: Did you try the final script without the authomatic "button pressing"?
You should include some "mark" just to know where the method is failing.
Good luck!![]()
Bookmarks