There's a special trigger construct:
#
There is also a special format for triggering by UI components:
Trigger 'name' on "UI Component Name" when (expression) {
commands
}
It behaves in the same way as the normal format, except that it is only evaluated when the UI component is used. The name follows the same rules as for message boxes.
The body of the trigger is executed only when the expression is true (not equal to 0).
#
For example:
will send a message to the game player when he clicks on the 'Treaty' tab in the process of forming a new proposal. (It will ask him to set a length for the treaty.) But this is a bit awkward, it would be better to trigger the message when the game player clicks on the name of the actual treaty (which is some kind of list element). Does anyone know how to do this, or if it's possible? (I suppose these list elements might not count as UI componants.)
#
There is also a special format for triggering by UI components:
Trigger 'name' on "UI Component Name" when (expression) {
commands
}
It behaves in the same way as the normal format, except that it is only evaluated when the UI component is used. The name follows the same rules as for message boxes.
The body of the trigger is executed only when the expression is true (not equal to 0).
#
For example:
Code:
trigger 'NewTreatyData' on "DipWizard.Stage1.Tabs.Treaty.TabButton" when (1) { message(g.player,'TreatyLength'); }
Comment