That tutorial is a bit dated. A modern setup for a basic yes/no script looks more like this:
Code:
monitor_event PreFactionTurnStart FactionType england ;this is a generic turn tracking monitor for england, it is convenient for many scripts to have these monitors for every faction
set_event_counter faction_turn_england 1
end_monitor
;... monitors for all other faction turns
monitor_event FactionTurnEnd
set_event_counter faction_turn_england 0
;... all other factions turn counters set to 0
end_monitor
monitor_event ;... event conditions for this random monitor
;... conditions and other effects in this random monitor
set_event_counter yes_no_question_accepted 0 ;game reloaded safety, in case this script previously fired
set_event_counter yes_no_question_declined 0
historic_event yes_no_question true factions { england, } ;send yes/no question only to england, can send to multiple factions or all factions as well
while I_EventCounter yes_no_question_accepted == 0 ;this is optional, it pauses execution of this monitor until the user answers the yes/no question, can be useful for offering multiple yes/no questions sequentially
and I_EventCounter yes_no_question_declined == 0
end_while
;... other stuff in this random monitor
end_monitor
monitor_event EventCounter EventCounterType yes_no_question_accepted ;yes/no question accepted
and EventCounter > 0 ;in case the counter ever goes below 0 elsewhere in script
log always ++++ yes_no_question_accepted ++++ ;this is optional, it puts a note in your script trace log file that the user accepted the event, you can change the text
:... do stuff for accepted
end_monitor
monitor_event EventCounter EventCounterType yes_no_question_declined ;yes/no question declined
and EventCounter > 0
log always ++++ yes_no_question_declined ++++
;do stuff for declined
end_monitor
monitor_event GameReloaded ;game reloaded safety monitor, this is useful for yes/no events in single player (when the user saves and reloads before making a decision) and for all events in multiplayer hotseat (reloading kills all historic_events)
campaign_wait 0.1 ;without this, the messages won't be sent after the GameReloaded event fires
if I_EventCounter faction_turn_england == 1 ;campaign reloaded on england's turn
and not I_IsFactionAIControlled england
if I_EventCounter yes_no_question > 0 ;if the historic event has been given...
and I_EventCounter yes_no_question_accepted == 0 ;... but the yes/no question has been neither accepted nor declined...
and I_EventCounter yes_no_question_declined == 0
historic_event yes_no_question true factions { england, } ;... then send the option again
end_if
end_if
end_monitor
These EventCounterType monitors are obviously not the only way to interact with the yes/no event. Since it always generates these _accepted and _declined counters, we can query those wherever we like:
Code:
if I_EventCounter yes_no_question_accepted == 1
;do stuff
end_if