武装突袭 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