Difference between revisions of "Template:Command"
Jump to navigation
Jump to search
Fred Gandt (talk | contribs) (Reverting due to effs and args being messed up >.< - will fix asap) |
Fred Gandt (talk | contribs) (Almost certain that'll fix it.) |
||
Line 1: | Line 1: | ||
− | <includeonly>__NOTOC__ __NOEDITSECTION__ | + | <includeonly>__NOTOC__ __NOEDITSECTION__ <div class="command_description"><!-- |
− | <div class="command_description">[[Image:{{{1}}}_{{{2}}}.gif|Introduced in {{{{{1}}}}} version {{{2}}}]]{{if | + | -->[[Image:{{{1}}}_{{{2}}}.gif|Introduced in {{{{{1}}}}} version {{{2}}}]]<!-- |
− | < | + | -->{{#if:{{{arg|}}}|{{Command-image|arguments_{{{arg}}}}}|}}<!-- |
+ | -->{{#if:{{{eff|}}}|{{Command-image|effects_{{{eff}}}}}|}}<!-- | ||
− | === Introduced in | + | If image links are incorrect, page should feature in [[:Category:Pages with broken file links]] |
+ | |||
+ | -->{{#switch:no|{{#if:{{{1|}}}|{{{2|no}}}|no}}|{{{arg|no}}}|{{{eff|no}}}=|#default= | ||
+ | <p><span style="color:#999;font-size:0.7em;margin-top:0">Click on the images for descriptions</span></p>}}<!-- if((1 && 2) || arg || eff) { showThis(); } --> | ||
+ | |||
+ | <h3>Introduced in</h3> | ||
<dl> | <dl> | ||
− | <dt>Game:<dd>{{{{{1}}}}} | + | <dt>Game:</dt> |
− | <dt>Version:<dd>{{{2|1.00}}} | + | <dd>{{{{{1}}} }}</dd> |
+ | <dt>Version:</dt> | ||
+ | <dd>{{{2|1.00}}}</dd> | ||
</dl> | </dl> | ||
− | + | <h3>Description</h3> | |
<dl> | <dl> | ||
− | <dt>Description:<dd>{{{3|}}} | + | <dt>Description:</dt> |
− | </dl> | + | <dd>{{{3|}}}</dd> |
+ | </dl><!-- | ||
− | <h3>Syntax</h3> | + | -->{{#if:{{{4|}}}|<h3>Syntax</h3> |
<dl> | <dl> | ||
− | <dt>Syntax: | + | <dt>Syntax:</dt> |
− | <dd>{{{4}}} | + | <dd>{{{4}}}</dd>|}}<!-- |
− | }} | + | |
− | {{if | + | -->{{#if:{{{p1|}}}| |
− | <dt>Return Value: | + | {{Command-param|{{{p1}}}|<dt>Parameters:</dt>}} |
− | <dd>{{{5|None.}}} | + | {{#if:{{{p2|}}}|{{Command-param|{{{p2}}}</dd>}} |
− | </dl> | + | {{#if:{{{p3|}}}|{{Command-param|{{{p3}}}</dd>}} |
+ | {{#if:{{{p4|}}}|{{Command-param|{{{p4}}}</dd>}} | ||
+ | {{#if:{{{p5|}}}|{{Command-param|{{{p5}}}</dd>}} | ||
+ | {{#if:{{{p6|}}}|{{Command-param|{{{p6}}}</dd>}} | ||
+ | {{#if:{{{p7|}}}|{{Command-param|{{{p7}}}</dd>}} | ||
+ | {{#if:{{{p8|}}}|{{Command-param|{{{p8}}}</dd>}} | ||
+ | {{#if:{{{p9|}}}|{{Command-param|{{{p9}}}</dd>}} | ||
+ | {{#if:{{{p10|}}}|{{Command-param|{{{p10}}}</dd>}} | ||
+ | {{#if:{{{p11|}}}|{{Command-param|{{{p11}}}</dd>}} | ||
+ | {{#if:{{{p12|}}}|{{Command-param|{{{p12}}}</dd>}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}<!-- | ||
+ | |||
+ | -->{{#if:{{{4|}}}| | ||
+ | <dt>Return Value:</dt> | ||
+ | <dd>{{{5|None.}}}</dd> | ||
+ | </dl>|}}<!-- | ||
− | <h3> Alternative Syntax </h3> | + | -->{{#if:{{{s2|}}}| |
+ | <h3>Alternative Syntax</h3> | ||
<dl> | <dl> | ||
− | <dt>Syntax: | + | <dt>Syntax:</dt> |
− | <dd>{{{s2}}} | + | <dd>{{{s2}}}</dd>|}}<!-- |
− | }} | + | |
− | {{if | + | -->{{#if:{{{p21|}}}| |
− | <dt>Return Value: | + | {{Command-param|{{{p21}}}|<dt>Parameters:</dt>}} |
− | <dd>{{{r2|None.}}} | + | {{#if:{{{p22|}}}|{{Command-param|{{{p22}}}</dd>}} |
− | </dl> | + | {{#if:{{{p23|}}}|{{Command-param|{{{p23}}}</dd>}} |
+ | {{#if:{{{p24|}}}|{{Command-param|{{{p24}}}</dd>}} | ||
+ | {{#if:{{{p25|}}}|{{Command-param|{{{p25}}}</dd>}} | ||
+ | {{#if:{{{p26|}}}|{{Command-param|{{{p26}}}</dd>}} | ||
+ | {{#if:{{{p27|}}}|{{Command-param|{{{p27}}}</dd>}} | ||
+ | {{#if:{{{p28|}}}|{{Command-param|{{{p28}}}</dd>}} | ||
+ | {{#if:{{{p29|}}}|{{Command-param|{{{p29}}}</dd>}} | ||
+ | {{#if:{{{p30|}}}|{{Command-param|{{{p30}}}</dd>}} | ||
+ | {{#if:{{{p31|}}}|{{Command-param|{{{p31}}}</dd>}} | ||
+ | {{#if:{{{p32|}}}|{{Command-param|{{{p32}}}</dd>}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}<!-- | ||
+ | |||
+ | -->{{#if:{{{s2|}}}| | ||
+ | <dt>Return Value:</dt> | ||
+ | <dd>{{{r2|None.}}}</dd> | ||
+ | </dl>|}}<!-- | ||
+ | -->{{#if:{{{4|}}}| | ||
<h3>Examples</h3> | <h3>Examples</h3> | ||
− | <dl> | + | <dl>|}}<!-- |
+ | -->{{#if:{{{x1|}}}| | ||
+ | {{Command-example|{{{x1}}}</dd>|<dt>Example 1:</dt>}} | ||
+ | {{#if:{{{x2|}}}|{{Command-example|{{{x2}}}</dd>|<dt>Example 2:</dt>}} | ||
+ | {{#if:{{{x3|}}}|{{Command-example|{{{x3}}}</dd>|<dt>Example 3:</dt>}} | ||
+ | {{#if:{{{x4|}}}|{{Command-example|{{{x4}}}</dd>|<dt>Example 4:</dt>}}|}}|}}|}}|}}<!-- | ||
+ | |||
+ | -->{{#if:{{{4|}}}|</dl> | ||
<h3>Additional Information</h3> | <h3>Additional Information</h3> | ||
<dl> | <dl> | ||
− | <dt>Multiplayer: | + | <dt>Multiplayer:</dt> |
− | <dd>{{{mp|-}}} | + | <dd>{{{mp|-}}}</dd>|}}<!-- |
− | }}{{if | + | |
− | + | -->{{#if:{{{pr|}}}| | |
− | </dl> | + | <dt>Problems:</dt> |
− | }} | + | <dd>{{{pr}}}</dd>|}} |
− | + | <dt>See also:</dt> | |
+ | <dd style="font-weight:bold;">{{{6}}}</dd><!-- | ||
+ | |||
+ | -->{{#if:{{{4|}}}|</dl>|}} | ||
+ | |||
+ | <h3>Notes</h3> | ||
<h3 style="display:none">Notes</h3> | <h3 style="display:none">Notes</h3> | ||
<dl class="command_description"> | <dl class="command_description"> | ||
− | <!-- Note Section | + | <!-- START Note Section --> |
− | <!-- Note Section | + | <!-- END Note Section --> |
</dl> | </dl> | ||
− | + | <!-- | |
− | <!--[{{SERVER}}/wiki?title={{PAGENAMEE}}&action=edit§ion=1 + Add Note]--> | + | [{{SERVER}}/wiki?title={{PAGENAMEE}}&action=edit§ion=1 + Add Note] |
− | + | --> | |
<center>''Only post proven facts here. Use the [[{{NAMESPACE}} talk: {{PAGENAME}}|talk page]] or the [http://forums.bistudio.com/forumdisplay.php?f=4 forums] for discussions.''</center> | <center>''Only post proven facts here. Use the [[{{NAMESPACE}} talk: {{PAGENAME}}|talk page]] or the [http://forums.bistudio.com/forumdisplay.php?f=4 forums] for discussions.''</center> | ||
− | </div></includeonly><noinclude> | + | </div></includeonly><noinclude>__TOC__ __NOEDITSECTION__ |
== Syntax == | == Syntax == | ||
Line 64: | Line 115: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | GAME |= | + | | GAME |= Game |
− | |GAMEVERSION|= | + | |GAMEVERSION|= Game Version (number surrounded by NO SPACES) |
− | |arg= MPARGUMENTS |= | + | |arg= MPARGUMENTS |= Multiplayer Arguments |
− | |eff= MPEFFECTS |= | + | |eff= MPEFFECTS |= Multiplayer Effects |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | DESCRIPTION |= | + | | DESCRIPTION |= Description |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | SYNTAX |= | + | | SYNTAX |= Syntax |
− | |p1= PARAMETER1 |= | + | |p1= PARAMETER1 |= Parameter 1 |
− | |p2= PARAMETER2 |= | + | |p2= PARAMETER2 |= Parameter 2 |
− | |p3= PARAMETER3 |= | + | |p3= PARAMETER3 |= Parameter 3 |
− | |p4= PARAMETER4 |= | + | |p4= PARAMETER4 |= Parameter 4 |
− | |p5= PARAMETER5 |= | + | |p5= PARAMETER5 |= Parameter 5 |
− | |p6= PARAMETER6 |= | + | |p6= PARAMETER6 |= Parameter 6 |
− | |p7= PARAMETER7 |= | + | |p7= PARAMETER7 |= Parameter 7 |
− | |p8= PARAMETER8 |= | + | |p8= PARAMETER8 |= Parameter 8 |
− | |p9= PARAMETER9 |= | + | |p9= PARAMETER9 |= Parameter 9 |
− | |p10= PARAMETER10 |= | + | |p10= PARAMETER10 |= Parameter 10 |
− | |p11= PARAMETER11 |= | + | |p11= PARAMETER11 |= Parameter 11 |
− | |p12= PARAMETER12 |= | + | |p12= PARAMETER12 |= Parameter 12 |
− | | RETURNVALUE |= | + | | RETURNVALUE |= Return Value |
− | START alternative syntax (optional) | + | <!-- START alternative syntax (optional) --> |
− | |s2= ALT_SYNTAX |= | + | |s2= ALT_SYNTAX |= Alternative Syntax |
− | |p21= ALT_PARAMETER1 |= | + | |p21= ALT_PARAMETER1 |= Alternative Parameter 1 |
− | |p22= ALT_PARAMETER2 |= | + | |p22= ALT_PARAMETER2 |= Alternative Parameter 2 |
− | |p23= ALT_PARAMETER3 |= | + | |p23= ALT_PARAMETER3 |= Alternative Parameter 3 |
− | |p24= ALT_PARAMETER4 |= | + | |p24= ALT_PARAMETER4 |= Alternative Parameter 4 |
− | |p25= ALT_PARAMETER5 |= | + | |p25= ALT_PARAMETER5 |= Alternative Parameter 5 |
− | |p26= ALT_PARAMETER6 |= | + | |p26= ALT_PARAMETER6 |= Alternative Parameter 6 |
− | |p27= ALT_PARAMETER7 |= | + | |p27= ALT_PARAMETER7 |= Alternative Parameter 7 |
− | |p28= ALT_PARAMETER8 |= | + | |p28= ALT_PARAMETER8 |= Alternative Parameter 8 |
− | |p29= ALT_PARAMETER9 |= | + | |p29= ALT_PARAMETER9 |= Alternative Parameter 9 |
− | |p30= ALT_PARAMETER10 |= | + | |p30= ALT_PARAMETER10 |= Alternative Parameter 10 |
− | |p31= ALT_PARAMETER11 |= | + | |p31= ALT_PARAMETER11 |= Alternative Parameter 11 |
− | |p32= ALT_PARAMETER12 |= | + | |p32= ALT_PARAMETER12 |= Alternative Parameter 12 |
− | |r2= ALT_RETURNVALUE |= | + | |r2= ALT_RETURNVALUE |= Alternative Return Value |
− | END alternative syntax (optional) | + | <!-- END alternative syntax (optional) --> |
− | |mp= MPBEHAVIOUR |= | + | |mp= MPBEHAVIOUR |= Multiplayer Behaviour |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | |x1= EXAMPLE1 |= | + | |x1= EXAMPLE1 |= Example 1 |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | |x2= EXAMPLE2 |= | + | |x2= EXAMPLE2 |= Example 2 |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | |x3= EXAMPLE3 |= | + | |x3= EXAMPLE3 |= Example 3 |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | |x4= EXAMPLE4 |= | + | |x4= EXAMPLE4 |= Example 4 |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | SEEALSO |= | + | | SEEALSO |= See Also |
}} | }} | ||
Line 159: | Line 210: | ||
<h3 style="display:none">Notes</h3> | <h3 style="display:none">Notes</h3> | ||
<dl class="command_description"> | <dl class="command_description"> | ||
− | <!-- Note Section | + | <!-- START Note Section --> |
− | <!-- Note Section | + | <!-- END Note Section --> |
</dl> | </dl> | ||
Line 168: | Line 219: | ||
== Parameters == | == Parameters == | ||
− | '''All of the following parameters should be replaced by reasonable text!''' | + | '''All of the following parameters should be <span style="color:red;">replaced</span> by reasonable text!''' |
− | The | + | * The parameter ''GAME'' should contain the short name of the game when the command was introduced, being one of "''ofp''", "''ofpr''", "''arma''", "''arma2''" or "''arma3''". |
− | The parameter GAMEVERSION is obvious: It contains the version number when this command was included. '''This is the only parameter where you | + | * The parameter ''GAMEVERSION'' is obvious: It contains the version number when this command was included. '''This is the only parameter where you <span style="color:red;">must not</span> have spaces before or after the parameter!!!''' |
− | + | :: If the game version is a round number, include two zeros after the comma (ie, <tt>1.00, 2.00</tt>). If not, write the version number with all required numbers after the comma (ie, <tt>1.5, 1.34</tt> ...) | |
− | The parameter | + | * 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 | + | * 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 transferred through the net. |
− | The parameter SYNTAX should show the syntax for the command. There are several possibilities of format: | + | * The parameter ''DESCRIPTION'' should contain a brief but detailed description of the command. |
− | <pre>'''commandName''' | + | |
+ | * The parameter ''SYNTAX'' should show the syntax for the command. There are several possibilities of format: | ||
+ | <pre style="margin-left:2em;">'''commandName''' | ||
preargument '''commandName''' | preargument '''commandName''' | ||
Line 192: | Line 245: | ||
preargument '''commandName''' [postarg1, postarg2]</pre> | preargument '''commandName''' [postarg1, postarg2]</pre> | ||
− | etc. You get the drill. | + | :: 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 <tt>|p1= PARAM |</tt> and <tt>|p2= PARAM |</tt> and delete <tt>|p3=, |p4= and |p5=</tt>. | ||
− | + | :: The format should be one of the following two: | |
− | <pre>parameter: [[Type]] | + | <pre style="margin-left:4em;">parameter: [[Type]] |
parameter: [[Type]] - Description</pre> | parameter: [[Type]] - Description</pre> | ||
− | The parameter RETURNVALUE should contain a description of the return value. Again, there are two possible formats: | + | * The parameter ''RETURNVALUE'' should contain a description of the return value. Again, there are two possible formats: |
− | <pre>[[Type]] | + | <pre style="margin-left:2em;">[[Type]] |
[[Type]] - Description</pre> | [[Type]] - Description</pre> | ||
− | All parameters starting with ALT_ belong to the "alternative syntax" section and can be '''left | + | * All parameters starting with ''ALT_'' belong to the "alternative syntax" section and can be '''left out''' 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 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 | + | * The parameters ''EXAMPLE1'' to ''EXAMPLE4'' are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (contained by <tt><nowiki><code></nowiki></tt> tags) including descriptions of the examples. |
− | The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for [[doFire]] | + | * The parameter ''SEEALSO'' should contain a comma-separated list of links related to this command. Example for [[doFire]] might be: |
− | <pre>[[commandFire]], [[fire]]</pre> | + | <pre style="margin-left:2em;">[[commandFire]], [[fire]]</pre> |
== Example == | == Example == | ||
− | + | <pre style="white-space:pre-wrap;">{{Command|= | |
+ | ____________________________________________________________________________________________ | ||
− | + | | arma2 |= Game | |
− | |||
− | |1.00|= | + | |1.00|= Game Version (number surrounded by NO SPACES) |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | Adds an event handler to a given unit. For more information about event handlers and their | + | | Adds an event handler to a given unit. For more information about event handlers and their types check the scripting topic Event Handlers in this reference. You may add as many event handlers of any type as you like to every unit, if you add an event handler of type "killed" and there already exists one, the old one doesn't get overwritten. Use removeEventHandler to delete event handlers. |= Description |
− | types check the scripting topic Event Handlers in this reference. You may add as many event | ||
− | handlers of any type as you like to every unit, if you add an event handler of type "killed" | ||
− | and there already exists one, the old one doesn't get overwritten. Use removeEventHandler to | ||
− | delete event handlers. |= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | object '''addEventHandler''' [type, code] |= | + | | object '''addEventHandler''' [type, code] |= Syntax |
− | |p1= object: [[Object]] |= | + | |p1= object: [[Object]] |= Parameter 1 |
− | |p2= type: [[String]] - Explanation |= | + | |p2= type: [[String]] - Explanation |= Parameter 2 |
− | |p3= code: [[String]] - Explanation |= | + | |p3= code: [[String]] - Explanation |= Parameter 3 |
− | | [[Integer]] - The index of the currently added event handler is returned. Indices start at | + | | [[Integer]] - The index of the currently added event handler is returned. Indices start at 0 for each unit and increment with each added event handler. |= Return Value |
− | 0 for each unit and increment with each added event handler. |= | ||
− | | Behaviour unknown. |= | + | | Behaviour unknown. |= Multiplayer Behaviour |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | |x1= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor | + | |x1= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |
− | invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam | ||
− | et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est | ||
− | Lorem ipsum dolor sit amet. | ||
− | <code>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor | + | <code>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</code> |
− | invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</code> | ||
− | At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea | + | At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |= Example 1 |
− | takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur | ||
− | sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam | ||
− | erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita | ||
− | kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | |x2= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor | + | |x2= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |= Example 2 |
− | invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam | ||
− | et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est | ||
− | Lorem ipsum dolor sit amet. |= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | [[ | + | | [[someCommand]], [[getOutaHere]] |= See Also |
}} | }} | ||
Line 278: | Line 317: | ||
<h3 style="display:none">Bottom Section</h3></pre> | <h3 style="display:none">Bottom Section</h3></pre> | ||
− | [[Category:Templates|{{PAGENAME}}]] | + | [[:Category:Templates|{{PAGENAME}}]] |
</noinclude> | </noinclude> |
Revision as of 16:17, 20 April 2014
Contents
Syntax
You can insert a command using the following syntax:
{{Command|= ____________________________________________________________________________________________ | GAME |= Game |GAMEVERSION|= Game Version (number surrounded by NO SPACES) |arg= MPARGUMENTS |= Multiplayer Arguments |eff= MPEFFECTS |= Multiplayer Effects ____________________________________________________________________________________________ | DESCRIPTION |= Description ____________________________________________________________________________________________ | SYNTAX |= Syntax |p1= PARAMETER1 |= Parameter 1 |p2= PARAMETER2 |= Parameter 2 |p3= PARAMETER3 |= Parameter 3 |p4= PARAMETER4 |= Parameter 4 |p5= PARAMETER5 |= Parameter 5 |p6= PARAMETER6 |= Parameter 6 |p7= PARAMETER7 |= Parameter 7 |p8= PARAMETER8 |= Parameter 8 |p9= PARAMETER9 |= Parameter 9 |p10= PARAMETER10 |= Parameter 10 |p11= PARAMETER11 |= Parameter 11 |p12= PARAMETER12 |= Parameter 12 | RETURNVALUE |= Return Value <!-- START alternative syntax (optional) --> |s2= ALT_SYNTAX |= Alternative Syntax |p21= ALT_PARAMETER1 |= Alternative Parameter 1 |p22= ALT_PARAMETER2 |= Alternative Parameter 2 |p23= ALT_PARAMETER3 |= Alternative Parameter 3 |p24= ALT_PARAMETER4 |= Alternative Parameter 4 |p25= ALT_PARAMETER5 |= Alternative Parameter 5 |p26= ALT_PARAMETER6 |= Alternative Parameter 6 |p27= ALT_PARAMETER7 |= Alternative Parameter 7 |p28= ALT_PARAMETER8 |= Alternative Parameter 8 |p29= ALT_PARAMETER9 |= Alternative Parameter 9 |p30= ALT_PARAMETER10 |= Alternative Parameter 10 |p31= ALT_PARAMETER11 |= Alternative Parameter 11 |p32= ALT_PARAMETER12 |= Alternative Parameter 12 |r2= ALT_RETURNVALUE |= Alternative Return Value <!-- END alternative syntax (optional) --> |mp= MPBEHAVIOUR |= Multiplayer Behaviour ____________________________________________________________________________________________ |x1= EXAMPLE1 |= Example 1 ____________________________________________________________________________________________ |x2= EXAMPLE2 |= Example 2 ____________________________________________________________________________________________ |x3= EXAMPLE3 |= Example 3 ____________________________________________________________________________________________ |x4= EXAMPLE4 |= Example 4 ____________________________________________________________________________________________ | SEEALSO |= See Also }} <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- START Note Section --> <!-- END Note Section --> </dl> <h3 style="display:none">Bottom Section</h3>
Parameters
All of the following parameters should be replaced by reasonable text!
- The parameter GAME should contain the short name of the game when the command was introduced, being one of "ofp", "ofpr", "arma", "arma2" or "arma3".
- 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 transferred 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 out 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 EXAMPLE4 are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (contained by <code> tags) including descriptions of the examples.
- The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for doFire might be:
[[commandFire]], [[fire]]
Example
{{Command|= ____________________________________________________________________________________________ | arma2 |= Game |1.00|= Game Version (number surrounded by NO SPACES) ____________________________________________________________________________________________ | Adds an event handler to a given unit. For more information about event handlers and their types check the scripting topic Event Handlers in this reference. You may add as many event handlers of any type as you like to every unit, if you add an event handler of type "killed" and there already exists one, the old one doesn't get overwritten. Use removeEventHandler to delete event handlers. |= Description ____________________________________________________________________________________________ | object '''addEventHandler''' [type, code] |= Syntax |p1= object: [[Object]] |= Parameter 1 |p2= type: [[String]] - Explanation |= Parameter 2 |p3= code: [[String]] - Explanation |= Parameter 3 | [[Integer]] - The index of the currently added event handler is returned. Indices start at 0 for each unit and increment with each added event handler. |= Return Value | Behaviour unknown. |= Multiplayer Behaviour ____________________________________________________________________________________________ |x1= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. <code>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</code> At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |= Example 1 ____________________________________________________________________________________________ |x2= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |= Example 2 ____________________________________________________________________________________________ | [[someCommand]], [[getOutaHere]] |= See Also }} <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style="display:none">Bottom Section</h3>