Code Commands: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Rewritten introduction)
(Some further expansion)
Line 1: Line 1:
'''Code commands''' are any commands from the scripting language expecting a coded statement string as one of their paramaters. Earlier engines accepted code as such when it was provided as a [[String]] using quotation marks, ''or'' using braces. Since Armed Assault the engine <i>specifically</i> requires braces. Thus, because the way the engine determines whether it is dealing with code has changed, this list is presented here.
'''Code commands''' are any commands from the scripting language expecting a coded statement string as one of their paramaters. Earlier engines accepted code as such when it was provided as a [[String]] using quotation marks, ''or'' using braces. Since Armed Assault the engine <i>specifically</i> requires braces (see [[Code vs. Strings]]). Thus, because the way the engine determines whether it is dealing with code has changed, this list is presented here.


*[[buttonSetAction]] [idc, {[[Code]]}]
*[[buttonSetAction]] [idc, {[[Code]]}]
Line 9: Line 9:
*_display [[displaySetEventHandler]] ["KeyDown", {[[Code]]}]
*_display [[displaySetEventHandler]] ["KeyDown", {[[Code]]}]
*[[exitWith]] {[[Code]]}
*[[exitWith]] {[[Code]]}
*[[forEach]]
*{[[Code]]} [[forEach]] array
*[[if]] (condition) [[then]] {[[Code]]}
*[[if]] (condition) [[then]] {[[Code]]}
*[[if]] (condition) [[then]] {[[Code]]} [[else]] {[[Code]]}
*[[if]] (condition) [[then]] {[[Code]]} [[else]] {[[Code]]}
*_bool = [[isNil]] {[[Code]]}
*_bool = [[isNil]] {[[Code]]}
*[[onDoubleClick]] {[[Code]]}
*[[onMapSingleClick]] {[[Code]]}
*[[onMapSingleClick]] {[[Code]]}
*[[onPlayerConnected]] {[[Code]]}
*[[onPlayerConnected]] {[[Code]]}

Revision as of 12:48, 18 January 2010

Code commands are any commands from the scripting language expecting a coded statement string as one of their paramaters. Earlier engines accepted code as such when it was provided as a String using quotation marks, or using braces. Since Armed Assault the engine specifically requires braces (see Code vs. Strings). Thus, because the way the engine determines whether it is dealing with code has changed, this list is presented here.