Yeah, but it works fine if there are no characters selected. Which brings me to idea number one:
Code:
monitor_event ButtonPressed ButtonPressed end_turn
call_object_shortcut card_manager deselect_all
end_monitor
Unfortunately, that doesn't work. I hope I'm doing something wrong and you'll correct me.
Anyway, idea number two, aka second-best solution:
Code:
declare_counter CharacterSelected
monitor_event FactionTurnStart FactionIsLocal
set_counter CharacterSelected 0
end_monitor
monitor_event CharacterTurnStart FactionIsLocal
and (bunch of other conditions go here)
if I_CompareCounter CharacterSelected = 0
e_select_character
give_trait this TraitName 1
end_if
if I_CompareCounter CharacterSelected = 1
historic_event TEACH_PLAYER_HOW_TO_BEHAVE factions { all, }
end_if
end_monitor
monitor_event ButtonPressed ButtonPressed end_turn
if I_AgentSelected spy
set_counter CharacterSelected 1
end_if
if I_AgentSelected assassin
set_counter CharacterSelected 1
end_if
if I_AgentSelected diplomat
set_counter CharacterSelected 1
end_if
if I_AgentSelected admiral
set_counter CharacterSelected 1
end_if
if I_AgentSelected general
set_counter CharacterSelected 1
end_if
if I_AgentSelected named_character
set_counter CharacterSelected 1
end_if
end_monitor
This at least blocks the trait from being assigned to the wrong character and scolds the player to press Enter before ending his turn so that the trait can be assigned correctly. It's not ideal, but it's better than nothing.