- Operation Flashpoint
- Set the action of a control of the currently active user dialog. Can be used for buttons and active texts. See Dialog Control for more information about user dialogs.
- buttonSetAction [idc, action]
- [idc, action]: Array
- idc: Number - control ID
- action: String - code body that should be executed when the button/active text is clicked
buttonSetAction [100, "player exec ""reply.sqs"""]
- Posted on October 5, 2009 - 16:23
When using buttonSetAction for an ActiveText control from a script, you cannot use any variables local to the script in it.
/* This will print 'any bar' in the hint box, since _foo has no value according to buttonSetAction */ _foo = "foo"; buttonSetAction [100, "hint format[""%1 bar"", _foo];"];
- Posted on February 15, 2016 - 10:15 (UTC)
- This command does not overwride the buttonaction which was set via "action" in the hpp of the dialog