Topic title is question
Couldnt find this in a search anywhere, so, any answers and hopefully detailed explanations?
For example i mean could this happen
if so and so
command
end if
instead of
monitor
if
commmand
end if
end monitor
Topic title is question
Couldnt find this in a search anywhere, so, any answers and hopefully detailed explanations?
For example i mean could this happen
if so and so
command
end if
instead of
monitor
if
commmand
end if
end monitor
Do you even try this kinda stuff before making a thread about it?
Coz seriously i think u should try it first in game thats the only way u can learn. For me it's only the hard way i can always memorize it.
Anyways the answer to your question is NO. It has to be:-
monitor_..........
script........
if
script2.....
end_monitor
U truly are dude.
![]()
Of course they can, but i do not see any reason to do so.
The campaign script is made in such a way, that everything outside a "monitor_" is executed on script start. So if you for example have an if outside any monitor_ then the if will get checked before any monitors are loaded, and the game will either do or do not the thing inside the if. The only thing is - since you can only test a few conditions with an if, it just doesn't make any sense to actually use it.
So to sum up, everything inside monitor_ is caught by the magical "wait_monitors" at the end of the script. Anything outside, is executed instantly at script start and NEVER again (since the if can either return true or false).
Edit: Also, about things firing outside monitors. If you declare a counter then or set_counter, it will only be set once if outside a monitor?
set_counter ftt 1
Alone like that, would only be used once?
Hmm. Ok then, another question about it.
Would that terminate the monitor before the historic event happen, or would the historic event happen once and then the monitor would never fire again? (Assuming ftt = 0)Code:monitor_event CharacterComesOfAge AgentType = princess and FactionType sicily and not FactionIsLocal if I_CompareCounter ftt = 0 terminate_monitor end_if historic_event princess_sicily end_monitor
Usually all files a parsed from top to bottom. This is very important, for example, with traits because the triggers are executed in the order they are listed in the file:
This would work in the way that each character who neither has TraitA nor TraitB gets TraitA by a 50% chance, and all others get TraitB. If we turn that around it would no longer work:Code:;-------------------------------- Trigger One WhenToTest [something] Condition [whatever] and Trait TraitA = 0 and Trait TraitB = 0 Affects TraitA 1 Chance 50 ;-------------------------------- Trigger Two WhenToTest [something] Condition Trait TraitA = 0 Affects TraitB 1 Chance 100
Now everyone gets TraitB and no one TraitA.Code:;-------------------------------- Trigger Two WhenToTest [something] Condition Trait TraitA = 0 Affects TraitB 1 Chance 100 ;-------------------------------- Trigger One WhenToTest [something] Condition [whatever] and Trait TraitA = 0 and Trait TraitB = 0 Affects TraitA 1 Chance 50
Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
dHRR 0.8 beta released! get it here
New: Native America! A mini-mod for Kingdoms America