武装突袭 Wiki
Advertisement
Introduced with Operation Flashpoint version 1.5
  Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on

点击图片可看到更多讯息

开始使用于

游戏:
Operation Flashpoint
版本:
1.5

描述

描述:
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
返回值:
Nothing

替代句法

句法:
control buttonSetAction action
参数:
control: Control
action: String
返回值:
Nothing

范例

范例1:
buttonSetAction [100, "player exec ""reply.sqs"""]

额外资讯

多人游戏:
-
也可以看看:
buttonActionctrlActivate

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Posted on October 5, 2009 - 16:23
kungtotte
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];"];

Bottom Section

Posted on February 15, 2016 - 10:15 (UTC)
Molaron
This command does not overwride the buttonaction which was set via "action" in the hpp of the dialog
Advertisement