Template:Command VBS2
From Bohemia Interactive Community
Syntax
You can insert a command using the following syntax:
{{Command_VBS2|=
____________________________________________________________________________________________
| GAME |=
|GAMEVERSION|=
|arg= MPARGUMENTS |=
|eff= MPEFFECTS |=
____________________________________________________________________________________________
| DESCRIPTION |=
____________________________________________________________________________________________
| SYNTAX |=
|p1= PARAMETER1 |=
|p2= PARAMETER2 |=
|p3= PARAMETER3 |=
|p4= PARAMETER4 |=
|p5= PARAMETER5 |=
|p6= PARAMETER6 |=
|p7= PARAMETER7 |=
|p8= PARAMETER8 |=
| RETURNVALUE |=
START alternative syntax (optional)
|s2= ALT_SYNTAX |=
|p21= ALT_PARAMETER1 |=
|p22= ALT_PARAMETER2 |=
|p23= ALT_PARAMETER3 |=
|p24= ALT_PARAMETER4 |=
|p25= ALT_PARAMETER5 |=
|p26= ALT_PARAMETER6 |=
|p27= ALT_PARAMETER7 |=
|p28= ALT_PARAMETER8 |=
|p29= ALT_PARAMETER8 |=
|p30= ALT_PARAMETER8 |=
|r2= ALT_RETURNVALUE |=
END alternative syntax (optional)
|mp= MPBEHAVIOUR |=
____________________________________________________________________________________________
|x1= EXAMPLE1 |=
____________________________________________________________________________________________
|x2= EXAMPLE2 |=
____________________________________________________________________________________________
|x3= EXAMPLE3 |=
____________________________________________________________________________________________
| SEEALSO |=
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
Parameters
In order to distinguish between equally named, but differently behaved commands, in ArmA and VBS2, add the suffix "_(VBS2)" to the command's page name!
The paramter GAME should contain the short name of the game: "VBS2".
The parameter GAMEVERSION is obvious: It contains the version number when this command was included. This is the only parameter where you must not have spaces before or after the parameter!!! If the game version is a round number, include two zeros after the comma (ie, 1.00, 2.00). If not, write the version number with all required numbers after the comma (ie, 1.5, 1.34 ...)
The parameter MPARGUMENTS is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether this command needs the arguments to be local to the client it is executed on or if they can be global.
The parameter MPEFFECTS is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether the effects of the command are transfered through the net.
The parameter DESCRIPTION should contain a brief but detailed description of the command.
The parameter SYNTAX should show the syntax for the command. There are several possibilities of format:
'''commandName''' preargument '''commandName''' '''commandName''' postargument preargument '''commandName''' postargument [prearg1, prearg2] '''commandName''' postargument preargument '''commandName''' [postarg1, postarg2]
etc. You get the drill.
PARAMETER1 to PARAMETER5 are all optional and should contain descriptions of the parameters. If there are no parameters, delete all lines. If there are two parameters, mention only |p1= PARAM | and |p2= PARAM | and delete |p3=, |p4= and |p5=. The format should be one of the following two:
parameter: [[Type]] parameter: [[Type]] - Description
The parameter RETURNVALUE should contain a description of the return value. Again, there are two possible formats:
[[Type]] [[Type]] - Description
All parameters starting with ALT_ belong to the "alternative syntax" section and can be left away in commands with only one syntax. They are of the same format as the parameters without ALT_.
The parameter MPBEHAVIOUR should contain a description of the command's behaviour in multiplayer. If you have no description, delete the line.
The parameters EXAMPLE1 to EXAMPLE3 are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (using <pre> or <code> ?) including descriptions of the examples.
The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for doFire would be:
[[commandFire]], [[fire]]
Example
Page name = addEventHandler_(VBS2)
| Editors, please check Policy: Scripting Command Page Syntax. |
Click on the images for descriptions
Introduced in
- Game:
- Virtual Battlespace 2
- Version:
- 1.00
Description
- Description:
- Adds an event handler to a given group.
Syntax
- Syntax:
- ehindex = ehgroup addEventHandler ["type",{code}]
- Parameters:
- ehgroup: Group - Group to receive Event Handler
- type: String - Event Handlers type
- code: String - code that should be executed once the event occurs
- Return Value:
- Number (Event Handler index)
Examples
- Example 1:
(group player) addEventHandler ["WaypointComplete",{hint "waypoint complete"}]
Additional Information
- Multiplayer:
- Behaviour unknown.
- See also:
- addEventHandler, removeEventHandler
Notes
Notes
Notes
Bottom Section

