武装突袭 Wiki
Advertisement


This documentation is transcluded from Command/documentation, and is transcluded in both this page and {{Command}}.

• To edit the documentation, edit that page.

• To edit the template, edit this page.

Be certain to reflect changes to either page in the other.

Syntax

You can create a new function page using the following syntax:

{{Function|=
____________________________________________________________________________________________

| 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

|p13= PARAMETER13 |= Parameter 13

|p14= PARAMETER14 |= Parameter 14

|p15= PARAMETER15 |= Parameter 15

|p16= PARAMETER16 |= Parameter 16

|p17= PARAMETER17 |= Parameter 17

|p18= PARAMETER18 |= Parameter 18

|p19= PARAMETER19 |= Parameter 19

|p20= PARAMETER20 |= Parameter 20

| 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

|p33= ALT_PARAMETER13 |= Alternative Parameter 13

|p34= ALT_PARAMETER14 |= Alternative Parameter 14

|p35= ALT_PARAMETER15 |= Alternative Parameter 15

|p36= ALT_PARAMETER16 |= Alternative Parameter 16

|p37= ALT_PARAMETER17 |= Alternative Parameter 17

|p38= ALT_PARAMETER18 |= Alternative Parameter 18

|p39= ALT_PARAMETER19 |= Alternative Parameter 19

|p40= ALT_PARAMETER20 |= Alternative Parameter 20

|r2= ALT_RETURNVALUE |= Alternative Return Value

<!-- END alternative syntax (optional) -->



 
|exec= EXECUTION |= Execution By (defaults to [[call]] if omitted)
 
|mp= MPBEHAVIOUR |= Multiplayer Behaviour
____________________________________________________________________________________________

|x1= EXAMPLE1 |= Example 1
____________________________________________________________________________________________

|x2= EXAMPLE2 |= Example 2
____________________________________________________________________________________________

|x3= EXAMPLE3 |= Example 3
____________________________________________________________________________________________

|x4= EXAMPLE4 |= Example 4
____________________________________________________________________________________________

|x5= EXAMPLE5 |= Example 5
____________________________________________________________________________________________

|x6= EXAMPLE6 |= Example 6
____________________________________________________________________________________________

|x7= EXAMPLE7 |= Example 7
____________________________________________________________________________________________

|x8= EXAMPLE8 |= Example 8
____________________________________________________________________________________________

|x9= EXAMPLE9 |= Example 9
____________________________________________________________________________________________

|x10= EXAMPLE10 |= Example 10
____________________________________________________________________________________________

| SEEALSO |= See Also

}}

<dl class="command_description">
<!-- BEGIN Note Section -->
<!-- For example:
<dd class="notedate">Posted on Month Day, Year - Time (UTC)</dd>
<dt class="note">'''[[User:User Name|]]'''</dt>
<dd class="note">This is an example note. It is true and verifiable, and contains a little code snippet.
<code>[[if]] ([[_this]] == anExample) [[then]] { [[hint]] "Leave it here for others to read"; };</code></dd>
-->
<!-- END Note Section -->
</dl>

<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here e.g. [[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]] -->

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 PARAMETER20 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 EXECUTION defaults to call if omitted, but could also be spawn if included like so:
|exec= spawn |= Execution By (defaults to [[call]] if omitted
  • 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 EXAMPLE10 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

{{Function|=
____________________________________________________________________________________________

| 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

}}

<dl class="command_description">
<!-- BEGIN Note Section -->
<!-- For example:
<dd class="notedate">Posted on Month Day, Year - Time (UTC)</dd>
<dt class="note">'''[[User:User Name|]]'''</dt>
<dd class="note">This is an example note. It is true and verifiable, and contains a little code snippet.
<code>[[if]] ([[_this]] == anExample) [[then]] { [[hint]] "Leave it here for others to read"; };</code></dd>
-->
<!-- END Note Section -->
</dl>

<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here e.g. [[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]] -->
[[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]]

Advertisement