Difference between revisions of "Template:Command"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
m (Add line returns for bullet point lists)
 
(131 intermediate revisions by 13 users not shown)
Line 1: Line 1:
<includeonly>__NOTOC__ __NOEDITSECTION__ <div class="command_description">[[Image:{{{1}}}_{{{2}}}.gif|Introduced in {{{{{1}}}}} version {{{2}}}]]{{if defined call|{{{arg|}}}|image|arguments_{{{arg}}}.gif}}{{if defined call|{{{eff|}}}|image|effects_{{{eff}}}.gif}}
+
<includeonly>__NOTOC__ __NOEDITSECTION__ {{DEFAULTSORT:{{uc:{{PAGENAME}}}}}}<!--
  
<span style="color:#999; font-size:0.7em">Click on the images for descriptions</span>
+
Categories - disabled for Template:Command example
 +
Automatically includes page in category:
 +
- "<game>: New Scripting Commands List"
 +
- "Scripting Commands <game>"
 +
- "Introduced with Arma 3 Development Branch" if game1 = arma3dev
  
=== Introduced in ===
+
-->{{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | [[Category:{{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}: New Scripting Commands List]]<!--
 +
-->{{#ifeq: {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} | {{Name|arma3dev}} | [[Category:Introduced with {{arma3}} Development Branch]] }}<!--
 +
 
 +
Excludes VBS commands from main command category
 +
-->{{#ifeq: {{{game1|{{{game|{{{1}}}}}}}}} | vbs1 | | [[Category:Scripting Commands]] [[Category:Scripting Commands {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}]] }}
 +
{{#ifeq: {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} | {{Name|ofp}} | [[Category:Scripting Commands {{ofpr}}]] }}<!-- Add OFP:R cat to all OFP commands -->
 +
{{#if: {{{game2|}}} | [[Category:Scripting Commands {{Name|{{{game2|}}}}}]] }}
 +
{{#if: {{{game3|}}} | [[Category:Scripting Commands {{Name|{{{game3|}}}}}]] }}
 +
{{#if: {{{game4|}}} | [[Category:Scripting Commands {{Name|{{{game4|}}}}}]] }}
 +
{{#if: {{{game5|}}} | [[Category:Scripting Commands {{Name|{{{game5|}}}}}]] }}
 +
}}<!--
 +
^ closing ifeq TEMPLATE:COMMAND
 +
 
 +
--><div class="_description cmd"><!--
 +
 
 +
--><div class="top-icons"><!--
 +
 
 +
Categorise to "Introduced with <game> version <version>" - disabled for Template:Command example
 +
 
 +
-->{{GVI|{{{game1|{{{game|{{{1}}}}}}}}} | {{{version1|{{{version|{{{2|}}}}}}}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }}<!--
 +
-->{{#if:{{{game2|}}} | {{GVI|{{{game2}}} | {{{version2|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 +
-->{{#if:{{{game3|}}} | {{GVI|{{{game3}}} | {{{version3|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 +
-->{{#if:{{{game4|}}} | {{GVI|{{{game4}}} | {{{version4|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 +
-->{{#if:{{{game5|}}} | {{GVI|{{{game5}}} | {{{version5|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 +
 
 +
-->{{#if:{{{arg|{{{eff|}}}}}}|<span style="margin-left: 1em">|}}<!-- space between game versions and arguments/effects
 +
 
 +
-->{{#if:{{{arg|}}} | {{EffArg|cmd|arg|{{{arg}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 +
-->{{#if:{{{eff|}}} | {{EffArg|cmd|eff|{{{eff}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 +
 
 +
-->{{#if:{{{arg|{{{eff|}}}}}}|</span>|}}<!--
 +
 
 +
-->{{#if:{{{serverExec|}}}|<span style="margin-left: 1em">{{ServerExec | cmd | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}}}}</span>|}}<!-- ServerExec Param with left spacing from arguments/effects
 +
 
 +
--></div><!--
 +
 
 +
  ↓ People are not ready for you yet, my dear…!
 +
-->{{#ifeq:0|1|<div style="font-size: 0.9em"><!--
 +
-->[[:Category:{{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}: New Scripting Commands List|Introduced in '''{{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}''']] <!--
 +
-->[[:Category:Introduced with {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} version {{{version1|{{{version|{{{2|1.00}}}}}}}}}|version '''{{{version|{{{version1|{{{2|1.00}}}}}}}}}''']]<!--
 +
--></div>|}}
 +
 
 +
<div style="color:grey; font-size:0.75em">Hover &amp; click on the images for descriptions</div>
 +
 
 +
<h3>Description</h3>
 +
<dl>
 +
<dt>Description:</dt>
 +
<dd>
 +
{{{descr|{{{3|}}}}}}
 +
</dd>
 +
</dl><!--
 +
 
 +
-->{{#if:{{{mp|}}}|
 +
<dt>Multiplayer:</dt>
 +
<dd>
 +
{{{mp}}}
 +
</dd>|}}<!--
 +
 
 +
-->{{#if:{{{pr|}}}|
 +
<dt>Problem(s):</dt>
 +
<dd>
 +
{{{pr}}}
 +
</dd>|}}<!--
 +
 
 +
--><h3>Syntax</h3>
 
<dl>
 
<dl>
<dt>Game:</dt><dd>{{{{{1}}}}}</dd>
+
<dt>Syntax:</dt>
<dt>Version:</dt><dd>{{{2|1.00}}}</dd>
+
<dd>{{{s1|{{{4|'''{{PAGENAMEE}}'''}}}}}}</dd><!--
</dl>
+
 
 +
-->
 +
{{Command/params
 +
|  {{{p1|}}} |  {{{p2|}}} |  {{{p3|}}} |  {{{p4|}}} |  {{{p5|}}} |  {{{p6|}}} |  {{{p7|}}} |  {{{p8|}}} |  {{{p9|}}} | {{{p10|}}}
 +
| {{{p11|}}} | {{{p12|}}} | {{{p13|}}} | {{{p14|}}} | {{{p15|}}} | {{{p16|}}} | {{{p17|}}} | {{{p18|}}} | {{{p19|}}} | {{{p20|}}} }}
 +
<!--
 +
 
 +
-->{{#if:{{{s1|{{{4|}}}}}}|
 +
<dt>Return Value:</dt>
 +
<dd>{{{r1|{{{5|[[Nothing]]}}}}}}</dd>
 +
</dl>|}}<!--
 +
 
 +
-->{{#if:{{{s2|}}}|
 +
<h3>Alternative Syntax</h3>
 +
<dl>
 +
<dt>Syntax:</dt>
 +
<dd>{{{s2}}}</dd>|}}<!--
 +
 
 +
-->{{Command/params
 +
| {{{p21|}}} | {{{p22|}}} | {{{p23|}}} | {{{p24|}}} | {{{p25|}}} | {{{p26|}}} | {{{p27|}}} | {{{p28|}}} | {{{p29|}}} | {{{p30|}}}
 +
| {{{p31|}}} | {{{p32|}}} | {{{p33|}}} | {{{p34|}}} | {{{p35|}}} | {{{p36|}}} | {{{p37|}}} | {{{p38|}}} | {{{p39|}}} | {{{p40|}}} }}<!--
 +
 
 +
-->{{#if:{{{s2|}}}|
 +
<dt>Return Value:</dt>
 +
<dd>{{{r2|[[Nothing]]}}}</dd>
 +
</dl>|}}<!--
 +
 
 +
-->{{#if:{{{s3|}}}|
 +
<h3>Alternative Syntax 2</h3>
 +
<dl>
 +
<dt>Syntax:</dt>
 +
<dd>{{{s3}}}</dd>|}}<!--
 +
 
 +
-->{{Command/params
 +
| {{{p41|}}} | {{{p42|}}} | {{{p43|}}} | {{{p44|}}} | {{{p45|}}} | {{{p46|}}} | {{{p47|}}} | {{{p48|}}} | {{{p49|}}} | {{{p50|}}}
 +
| {{{p51|}}} | {{{p52|}}} | {{{p53|}}} | {{{p54|}}} | {{{p55|}}} | {{{p56|}}} | {{{p57|}}} | {{{p58|}}} | {{{p59|}}} | {{{p60|}}} }}<!--
 +
 
 +
-->{{#if:{{{s3|}}}|
 +
<dt>Return Value:</dt>
 +
<dd>{{{r3|[[Nothing]]}}}</dd>
 +
</dl>|}}<!--
 +
 
 +
-->{{#if:{{{s4|}}}|
 +
<h3>Alternative Syntax 3</h3>
 +
<dl>
 +
<dt>Syntax:</dt>
 +
<dd>{{{s4}}}</dd>|}}<!--
 +
 
 +
-->{{Command/params
 +
| {{{p61|}}} | {{{p62|}}} | {{{p63|}}} | {{{p64|}}} | {{{p65|}}} | {{{p66|}}} | {{{p67|}}} | {{{p68|}}} | {{{p69|}}} | {{{p70|}}}
 +
| {{{p71|}}} | {{{p72|}}} | {{{p73|}}} | {{{p74|}}} | {{{p75|}}} | {{{p76|}}} | {{{p77|}}} | {{{p78|}}} | {{{p79|}}} | {{{p80|}}} }}<!--
 +
 
 +
-->{{#if:{{{s4|}}}|
 +
<dt>Return Value:</dt>
 +
<dd>{{{r4|[[Nothing]]}}}</dd>
 +
</dl>|}}<!--
  
=== Description ===
+
-->{{#if:{{{s5|}}}|
 +
<h3>Alternative Syntax 4</h3>
 
<dl>
 
<dl>
<dt>Description:</dt><dd>{{{3|}}}</dd>
+
<dt>Syntax:</dt>
</dl>
+
<dd>{{{s5}}}</dd>|}}<!--
 +
 
 +
-->{{Command/params
 +
| {{{p81|}}} | {{{p82|}}} | {{{p83|}}} | {{{p84|}}} |  {{{p85|}}} | {{{p86|}}} | {{{p87|}}} | {{{p88|}}} | {{{p89|}}} |  {{{p90|}}}
 +
| {{{p91|}}} | {{{p92|}}} | {{{p93|}}} | {{{p94|}}} |  {{{p95|}}} | {{{p96|}}} | {{{p97|}}} | {{{p98|}}} | {{{p99|}}} | {{{p100|}}} }}<!--
 +
 
 +
-->{{#if:{{{s5|}}}|
 +
<dt>Return Value:</dt>
 +
<dd>{{{r5|[[Nothing]]}}}</dd>
 +
</dl>|}}<!--
  
=== Usage ===
+
-->{{#if:{{{s6|}}}|
 +
<h3>Alternative Syntax 5</h3>
 
<dl>
 
<dl>
 
<dt>Syntax:</dt>
 
<dt>Syntax:</dt>
<dd>{{{4}}}</dd>
+
<dd>{{{s6}}}</dd>|}}<!--
{{if defined call|{{{p1|}}}|Command-param|{{{p1}}}|<dt>Parameters:</dt>}}{{if defined call|{{{p2|}}}|Command-param|{{{p2}}}}}{{if defined call|{{{p3|}}}|Command-param|{{{p3}}}}}{{if defined call|{{{p4|}}}|Command-param|{{{p4}}}}}{{if defined call|{{{p5|}}}|Command-param|{{{p5}}}}}
+
 
 +
-->{{Command/params
 +
| {{{p101|}}} | {{{p102|}}} | {{{p103|}}} | {{{p104|}}} | {{{p105|}}} | {{{p106|}}} | {{{p107|}}} | {{{p108|}}} | {{{p109|}}} | {{{p110|}}}
 +
| {{{p111|}}} | {{{p112|}}} | {{{p113|}}} | {{{p114|}}} | {{{p115|}}} | {{{p116|}}} | {{{p117|}}} | {{{p118|}}} | {{{p119|}}} | {{{p120|}}} }}<!--
 +
 
 +
-->{{#if:{{{s6|}}}|
 
<dt>Return Value:</dt>
 
<dt>Return Value:</dt>
<dd>{{{5|None.}}}</dd>
+
<dd>{{{r6|[[Nothing]]}}}</dd>
<dt>Multiplayer:</dt>
+
</dl>|}}<!--
<dd>{{{mp|Behaviour unknown.}}}</dd>
+
 
 +
--><h3>Examples</h3>
 +
<dl>
 +
{{Command/examples | {{{x1|}}} | {{{x2|}}} | {{{x3|}}} | {{{x4|}}} |  {{{x5|}}} | {{{x6|}}} | {{{x7|}}} | {{{x8|}}} | {{{x9|}}} | {{{x10|}}} }}
 +
</dl>
 +
<h3>Additional Information</h3>
 +
<dl>
 +
<dt>See also:</dt>
 +
<dd class="seealso">{{#if:{{{seealso|{{{6|}}}}}}
 +
|{{#replace:
 +
{{#replace:{{{seealso|{{{6}}}}}}|], [|][}}
 +
|],[|][}}
 +
|{{See also needed}}}}</dd>
 
</dl>
 
</dl>
  
=== Examples ===
+
<h3>Notes</h3>
<dl>{{if defined call|{{{x1|}}}|Command-example|{{{x1}}}|<dt>Example 1:</dt>}}{{if defined call|{{{x2|}}}|Command-example|{{{x2}}}|<dt>Example 2:</dt>}}{{if defined call|{{{x3|}}}|Command-example|{{{x3}}}|<dt>Example 3:</dt>}}</dl>
+
<dd style="text-align: center">
 +
{{Messagebox
 +
| '''Only post proven facts here.'''<!--
 +
--> Report bugs on [http://feedback.arma3.com/ the feedback tracker].<!--
 +
--> Use the [[{{NAMESPACE}} talk:{{PAGENAME}}|Talk page]] or the [https://forums.bohemia.net/ Forums] for discussions.
 +
<div class{{=}}"plainlinks" style{{=}}"margin-top: -0.25em">
 +
[{{canonicalurl:{{FULLPAGENAMEE}}|action=edit&section{{=}}new&preload{{=}}Template:Add_new_note&preloadtitle{{=}}&summary{{=}}Added+new+note&nosummary{{=}}true}} Add New Note] {{!}} [[How To#Add a new note|How To]]
 +
</div>
 +
| i
 +
| #E5EEF8
 +
}}
 +
</dd>
 +
</div></includeonly><noinclude><!--
 +
 
 +
###########################################################################
 +
##################################################
 +
#########################
 +
 
 +
 
 +
DOCUMENTATION STARTS HERE
 +
 
 +
 
 +
#########################
 +
##################################################
 +
###########################################################################
 +
 
 +
-->[[:Category:Scripting Commands|Scripting Commands]] template, used by [[Special:WhatLinksHere/Template:Command|these pages]].
 +
{{Warning | Do '''NOT''' edit this template before <u>heavy</u> testing, as it is widely used!}}
 +
 
 +
== Usage ==
 +
{{<nowiki/>Command|''...parameters...''}}
 +
* game1: (can be game or unnamed parameter '''1''') short game name - same as [[Template:Name|Name]] template input format. e.g ofp, tkoh, arma3, etc.
 +
* version1: (Optional, default empty (unknown)) (can be version or unnamed parameter '''2''') number in [[Template:GVI]] template format: '''<Major>.<Minor>'''. e.g 1.46, 1.75, 1.86 etc.
 +
* arg: (Optional, default empty) argument locality definition - same as [[Template:EffArg|EffArg]] template input format. e.g local, loc or global, glob
 +
* eff: (Optional, default empty) effects locality definition - same as [[Template:EffArg|EffArg]] template input format. e.g local, loc or global, glob
 +
* serverExec: (Optional, default empty) if provided, will display the {{ServerExec}} icon informing the command must be run on the server
 +
* descr: (can be unnamed parameter '''3''') the command description
 +
* s1: (Optional, default <tt>{{<nowiki/>PAGENAMEE}}</tt>) (can be unnamed parameter '''4''') command syntax with named parameters. e.g {{Inline code|unit1 '''setDammage''' 1}}
 +
* p1..20: (Optional, default empty) command parameters with description
 +
* r1: (Optional, default [[Nothing]]) (can be unnamed parameter '''5''') syntax's return value
 +
* x1..10: (Optional, default <tt>{{<nowiki/>Example needed}}</tt>) command examples (to be put between <nowiki><code></code></nowiki> tags where needed)
 +
* seealso: (Optional, default <tt>{{<nowiki/>See also needed}}</tt>) (can be unnamed param '''6''') list of related links in wiki format, separated by comma or space. e.g <nowiki>[[setDir]] [[setPos]]</nowiki>
 +
* '''Secondary parameters:'''
 +
** mp: (Optional, default empty) if provided, will show a Multiplayer note under the description
 +
** pr: (Optional, default empty) if provided, will show a Problems note under the description
 +
** game2..5: (Optional, default empty) same as ''game1''
 +
** version2..5: (Optional, default empty) same as ''version1'', for the corresponding ''game#''
 +
** s2..6: (Optional, default empty) Alternative syntaxes 1 to 5 (see ''s1'')
 +
** p21..120: (Optional, default empty) Alternative syntaxes parameters (20 each: p21..40, p41..60, p61..80, p81..100, p101..120)
 +
** r2..r6: (Optional, default empty) Alternative syntaxes' return value (see ''r1'')
 +
 
 +
== Automatic categories ==
 +
* <tt>[[:Category:Scripting Commands]]</tt> '''''(except for VBS1 commands)'''''
 +
* <tt>Category:Scripting Commands ''game''</tt> (e.g [[:Category:Scripting Commands {{arma2}}]])
 +
* <tt>Introduced with ''game'''1''''' version ''version'''1'''''</tt> category (e.g [[:Category: Introduced with Arma 3 version 1.00|Category: Introduced with '''{{arma3}}''' version '''1.00''']])
 +
* <tt>''game'''1''''': New Scripting Commands List</tt> category (e.g [[:Category: {{arma2}}: New Scripting Commands List|Category: '''{{arma2}}''': New Scripting Commands List]])
 +
* <tt>[[:Category:Introduced with Arma 3 Development Branch]]</tt> if ''game1'' is <tt>arma3dev</tt>
 +
 
 +
== Full template ==
 +
<spoiler>
 +
<syntaxhighlight lang="html">
 +
{{Command
 +
 
 +
<!-- Games and versions -->
 +
 
 +
|game1= GAME1
 +
|version1= VERSION1
 +
 
 +
|game2= GAME2
 +
|version2= VERSION2
 +
|game3= GAME3
 +
|version3= VERSION3
 +
|game4= GAME4
 +
|version4= VERSION4
 +
|game5= GAME5
 +
|version5= VERSION5
  
=== Additional Information ===
+
|arg= ARGUMENTS_LOCALITY
<dl>{{if defined call|{{{6|}}}|Command-example|{{{6}}}|<dt>See also:</dt>}}</dl>
+
|eff= EFFECTS_LOCALITY
  
=== Notes ===
+
|serverExec= MP_EXECUTION
<center>''Please post only discovered facts about the given command here.'' '''''Do not ask questions!''''' ''Use the [[{{NAMESPACE}} talk: {{PAGENAME}}|Talk Page]] or the [http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi BI Forums] for any discussions. Use the [[Template:Note]] to post notes.''</center><dl>
 
  
 +
<!-- Description and syntaxes -->
  
</dl></div></includeonly><noinclude>
+
|descr= DESCRIPTION
  
'''This template is not yet complete!'''
+
|mp= MP BEHAVIOUR
  
== Syntax ==
+
|pr= POSSIBLE PROBLEMS
  
You can insert a command using the following syntax:
+
|s1= SYNTAX
  
<pre>{{Command|=
+
|p1= PARAMETER1
____________________________________________________________________________________________
 
  
| GAME |=
+
|p2= PARAMETER2
  
|GAMEVERSION|=
+
|p3= PARAMETER3
  
|arg= MPARGUMENTS |=
+
|p4= PARAMETER4
  
|eff= MPEFFECTS |=
+
|p5= PARAMETER5
____________________________________________________________________________________________
 
  
| DESCRIPTION |=
+
|p6= PARAMETER6
____________________________________________________________________________________________
 
  
| SYNTAX |=
+
|p7= PARAMETER7
  
|p1= PARAMETER1 |=
+
|p8= PARAMETER8
  
|p2= PARAMETER2 |=
+
|p9= PARAMETER9
  
|p3= PARAMETER3 |=
+
|p10= PARAMETER10
  
|p4= PARAMETER4 |=
+
|p11= PARAMETER11
  
|p5= PARAMETER5 |=
+
|p12= PARAMETER12
  
| RETURNVALUE |=
+
|p13= PARAMETER13
  
|mp= MPBEHAVIOUR |=
+
|p14= PARAMETER14
____________________________________________________________________________________________
 
  
|x1= EXAMPLE1 |=
+
|p15= PARAMETER15
____________________________________________________________________________________________
 
  
|x2= EXAMPLE2 |=
+
|p16= PARAMETER16
____________________________________________________________________________________________
 
  
|x3= EXAMPLE3 |=
+
|p17= PARAMETER17
____________________________________________________________________________________________
 
  
| SEEALSO |=
+
|p18= PARAMETER18
  
 +
|p19= PARAMETER19
 +
 +
|p20= PARAMETER20
 +
 +
|r1= RETURN_VALUE
 +
 +
<!-- Syntax 2 (Alternative) -->
 +
 +
|s2= SYNTAX2
 +
 +
|p21= SYNTAX2_PARAMETER1
 +
|p22= SYNTAX2_PARAMETER2
 +
|p23= SYNTAX2_PARAMETER3
 +
|p24= SYNTAX2_PARAMETER4
 +
|p25= SYNTAX2_PARAMETER5
 +
|p26= SYNTAX2_PARAMETER6
 +
|p27= SYNTAX2_PARAMETER7
 +
|p28= SYNTAX2_PARAMETER8
 +
|p29= SYNTAX2_PARAMETER9
 +
|p30= SYNTAX2_PARAMETER10
 +
|p31= SYNTAX2_PARAMETER11
 +
|p32= SYNTAX2_PARAMETER12
 +
|p33= SYNTAX2_PARAMETER13
 +
|p34= SYNTAX2_PARAMETER14
 +
|p35= SYNTAX2_PARAMETER15
 +
|p36= SYNTAX2_PARAMETER16
 +
|p37= SYNTAX2_PARAMETER17
 +
|p38= SYNTAX2_PARAMETER18
 +
|p39= SYNTAX2_PARAMETER19
 +
|p40= SYNTAX2_PARAMETER20
 +
 +
|r2= SYNTAX2_RETURNVALUE
 +
 +
<!-- Syntax 3 (Alternative) -->
 +
 +
|s3= SYNTAX3
 +
 +
|p41= SYNTAX3_PARAMETER1
 +
|p42= SYNTAX3_PARAMETER2
 +
|p43= SYNTAX3_PARAMETER3
 +
|p44= SYNTAX3_PARAMETER4
 +
|p45= SYNTAX3_PARAMETER5
 +
|p46= SYNTAX3_PARAMETER6
 +
|p47= SYNTAX3_PARAMETER7
 +
|p48= SYNTAX3_PARAMETER8
 +
|p49= SYNTAX3_PARAMETER9
 +
|p50= SYNTAX3_PARAMETER10
 +
|p51= SYNTAX3_PARAMETER11
 +
|p52= SYNTAX3_PARAMETER12
 +
|p53= SYNTAX3_PARAMETER13
 +
|p54= SYNTAX3_PARAMETER14
 +
|p55= SYNTAX3_PARAMETER15
 +
|p56= SYNTAX3_PARAMETER16
 +
|p57= SYNTAX3_PARAMETER17
 +
|p58= SYNTAX3_PARAMETER18
 +
|p59= SYNTAX3_PARAMETER19
 +
|p60= SYNTAX3_PARAMETER20
 +
 +
|r3= SYNTAX3_RETURNVALUE
 +
 +
<!-- Syntax 4 (Alternative) -->
 +
 +
|s4= SYNTAX4
 +
 +
|p61= SYNTAX4_PARAMETER1
 +
|p62= SYNTAX4_PARAMETER2
 +
|p63= SYNTAX4_PARAMETER3
 +
|p64= SYNTAX4_PARAMETER4
 +
|p65= SYNTAX4_PARAMETER5
 +
|p66= SYNTAX4_PARAMETER6
 +
|p67= SYNTAX4_PARAMETER7
 +
|p68= SYNTAX4_PARAMETER8
 +
|p69= SYNTAX4_PARAMETER9
 +
|p70= SYNTAX4_PARAMETER10
 +
|p71= SYNTAX4_PARAMETER11
 +
|p72= SYNTAX4_PARAMETER12
 +
|p73= SYNTAX4_PARAMETER13
 +
|p74= SYNTAX4_PARAMETER14
 +
|p75= SYNTAX4_PARAMETER15
 +
|p76= SYNTAX4_PARAMETER16
 +
|p77= SYNTAX4_PARAMETER17
 +
|p78= SYNTAX4_PARAMETER18
 +
|p79= SYNTAX4_PARAMETER19
 +
|p80= SYNTAX4_PARAMETER20
 +
 +
|r4= SYNTAX4_RETURNVALUE
 +
 +
<!-- Syntax 5 (Alternative) -->
 +
 +
|s5= SYNTAX5
 +
 +
|p81= SYNTAX5_PARAMETER1
 +
|p82= SYNTAX5_PARAMETER2
 +
|p83= SYNTAX5_PARAMETER3
 +
|p84= SYNTAX5_PARAMETER4
 +
|p85= SYNTAX5_PARAMETER5
 +
|p86= SYNTAX5_PARAMETER6
 +
|p87= SYNTAX5_PARAMETER7
 +
|p88= SYNTAX5_PARAMETER8
 +
|p89= SYNTAX5_PARAMETER9
 +
|p90= SYNTAX5_PARAMETER10
 +
|p91= SYNTAX5_PARAMETER11
 +
|p92= SYNTAX5_PARAMETER12
 +
|p93= SYNTAX5_PARAMETER13
 +
|p94= SYNTAX5_PARAMETER14
 +
|p95= SYNTAX5_PARAMETER15
 +
|p96= SYNTAX5_PARAMETER16
 +
|p97= SYNTAX5_PARAMETER17
 +
|p98= SYNTAX5_PARAMETER18
 +
|p99= SYNTAX5_PARAMETER19
 +
|p100= SYNTAX5_PARAMETER20
 +
 +
|r5= SYNTAX5_RETURNVALUE
 +
 +
<!-- Syntax 6 (Alternative) -->
 +
 +
|s6= SYNTAX6
 +
 +
|p101= SYNTAX6_PARAMETER1
 +
|p102= SYNTAX6_PARAMETER2
 +
|p103= SYNTAX6_PARAMETER3
 +
|p104= SYNTAX6_PARAMETER4
 +
|p105= SYNTAX6_PARAMETER5
 +
|p106= SYNTAX6_PARAMETER6
 +
|p107= SYNTAX6_PARAMETER7
 +
|p108= SYNTAX6_PARAMETER8
 +
|p109= SYNTAX6_PARAMETER9
 +
|p110= SYNTAX6_PARAMETER10
 +
|p111= SYNTAX6_PARAMETER11
 +
|p112= SYNTAX6_PARAMETER12
 +
|p113= SYNTAX6_PARAMETER13
 +
|p114= SYNTAX6_PARAMETER14
 +
|p115= SYNTAX6_PARAMETER15
 +
|p116= SYNTAX6_PARAMETER16
 +
|p117= SYNTAX6_PARAMETER17
 +
|p118= SYNTAX6_PARAMETER18
 +
|p119= SYNTAX6_PARAMETER19
 +
|p120= SYNTAX6_PARAMETER20
 +
 +
|r6= SYNTAX6_RETURNVALUE
 +
 +
<!-- Examples -->
 +
 +
|x1= EXAMPLE1
 +
 +
|x2= EXAMPLE2
 +
 +
|x3= EXAMPLE3
 +
 +
|x4= EXAMPLE4
 +
 +
|x5= EXAMPLE5
 +
 +
|x6= EXAMPLE6
 +
 +
|x7= EXAMPLE7
 +
 +
|x8= EXAMPLE8
 +
 +
|x9= EXAMPLE9
 +
 +
|x10= EXAMPLE10
 +
 +
|seealso= SEE_ALSO
 
}}
 
}}
<dl class="command_description">
 
<!-- Note Section BEGIN -->
 
  
<!-- Note Section END -->
+
<h3 style="display:none">Bottom Section</h3>
</dl></pre>
+
<!-- Appropriate categories go here e.g. [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] -->
 +
</syntaxhighlight>
 +
</spoiler>
 +
 
 +
== Example ==
  
== Parameters ==
+
{| class="wikitable"
 +
! Code
 +
! Result
 +
|-
 +
| <syntaxhighlight lang="html">{{Command
  
'''All of the following parameters should be replaced by reasonable text!'''
+
<!-- Games and versions -->
  
The paramter GAME should contain the short name of the game when the command was introduced, being one of "ofp", "ofpr" or "arma".
+
|game1= ofp
 +
|game2= arma1
 +
|game3= arma2
 +
|game4= arma3
 +
|game5= tkoh
 +
|version1= 1.46
 +
|version2= 1.05
 +
|version3= 1.12
 +
|version4= 1.96
 +
|version5= 1.10
  
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 ...)
+
|arg= local
 +
|eff= global
  
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.
+
|serverExec= server
  
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.
+
<!-- Description and syntaxes -->
  
The parameter DESCRIPTION should contain a brief but detailed description of the command.
+
|descr= DESCRIPTION
  
The parameter SYNTAX should show the syntax for the command. There are several possibilities of format:
+
|mp= MP BEHAVIOUR
<pre>'''commandName'''
 
  
preargument '''commandName'''
+
|pr= POSSIBLE PROBLEMS
  
'''commandName''' postargument
+
|s1= SYNTAX
  
preargument '''commandName''' postargument
+
|p1= PARAMETER1
  
[prearg1, prearg2] '''commandName''' postargument
+
|p2= PARAMETER2
  
preargument '''commandName''' [postarg1, postarg2]</pre>
+
|p3= PARAMETER3
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:
+
|p4= PARAMETER4
<pre>parameter: [[Type]]
 
  
parameter: [[Type]] - Description</pre>
+
|p5= PARAMETER5
  
The parameter RETURNVALUE should contain a description of the return value. Again, there are two possible formats:
+
|p6= PARAMETER6
<pre>[[Type]]
 
  
[[Type]] - Description</pre>
+
|p7= PARAMETER7
  
The parameter MPBEHAVIOUR should contain a description of the command's behaviour in multiplayer. If you have no description, delete the line.
+
|p8= PARAMETER8
  
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 <nowiki><pre> or <code></nowiki> ?) including descriptions of the examples.
+
|p9= PARAMETER9
  
The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for [[doFire]] would be:
+
|p10= PARAMETER10
<pre>[[commandFire]], [[fire]]</pre>
 
  
== Example ==
+
|p11= PARAMETER11
 +
 
 +
|p12= PARAMETER12
 +
 
 +
|p13= PARAMETER13
 +
 
 +
|p14= PARAMETER14
 +
 
 +
|p15= PARAMETER15
 +
 
 +
|p16= PARAMETER16
 +
 
 +
|p17= PARAMETER17
 +
 
 +
|p18= PARAMETER18
 +
 
 +
|p19= PARAMETER19
 +
 
 +
|p20= PARAMETER20
 +
 
 +
|r1= RETURN_VALUE
 +
 
 +
|x1= <code>this '''command''' that</code>
 +
 
 +
|seealso=
 +
[[Template:{{PAGENAME}}|seeAlso 1]]
 +
[[Template:{{PAGENAME}}|seeAlso 2]]
 +
[[Template:{{PAGENAME}}|seeAlso 3]]
 +
[[Template:{{PAGENAME}}|seeAlso 4]]
 +
}}</syntaxhighlight>
 +
| style="vertical-align: top" |
 +
 
 +
{{Command
 +
 
 +
<!-- Games and versions -->
 +
 
 +
|game1= ofp
 +
|game2= arma1
 +
|game3= arma2
 +
|game4= arma3
 +
|game5= tkoh
 +
|version1= 1.46
 +
|version2= 1.05
 +
|version3= 1.12
 +
|version4= 1.96
 +
|version5= 1.10
 +
 
 +
|arg= local
 +
|eff= global
 +
 
 +
|serverExec= server
 +
 
 +
<!-- Description and syntaxes -->
 +
 
 +
|descr= DESCRIPTION
 +
 
 +
|mp= MP BEHAVIOUR
 +
 
 +
|pr= POSSIBLE PROBLEMS
 +
 
 +
|s1= SYNTAX
 +
 
 +
|p1= PARAMETER1
 +
 
 +
|p2= PARAMETER2
 +
 
 +
|p3= PARAMETER3
 +
 
 +
|p4= PARAMETER4
 +
 
 +
|p5= PARAMETER5
 +
 
 +
|p6= PARAMETER6
 +
 
 +
|p7= PARAMETER7
  
''Should be replaced by a valid example later . . .''
+
|p8= PARAMETER8
  
<pre>{{Command|=
+
|p9= PARAMETER9
____________________________________________________________________________________________
 
  
|1.00|=
+
|p10= PARAMETER10
____________________________________________________________________________________________
 
  
| Adds an event handler to a given unit. For more information about event handlers and their
+
|p11= PARAMETER11
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] |=
+
|p12= PARAMETER12
  
|p1= object: [[Object]] |=
+
|p13= PARAMETER13
  
|p2= type: [[String]] - Explanation |=
+
|p14= PARAMETER14
  
|p3= code: [[String]] - Explanation |=
+
|p15= PARAMETER15
  
| [[Integer]] - The index of the currently added event handler is returned. Indices start at
+
|p16= PARAMETER16
0 for each unit and increment with each added event handler. |=
 
  
| Behaviour unknown. |=
+
|p17= PARAMETER17
____________________________________________________________________________________________
 
  
|x1= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
+
|p18= PARAMETER18
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
+
|p19= PARAMETER19
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
+
|p20= PARAMETER20
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
+
|r1= RETURN_VALUE
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. |=
 
____________________________________________________________________________________________
 
  
| [[removeEventHandler]] |=
+
|x1= <code>this '''command''' that</code>
  
 +
|seealso=
 +
[[Template:{{PAGENAME}}|seeAlso 1]]
 +
[[Template:{{PAGENAME}}|seeAlso 2]]
 +
[[Template:{{PAGENAME}}|seeAlso 3]]
 +
[[Template:{{PAGENAME}}|seeAlso 4]]
 
}}
 
}}
<dl class="command_description">
+
|}
<!-- Note Section BEGIN -->
 
 
 
<!-- Note Section END -->
 
</dl></pre>
 
  
[[Category:Templates|{{PAGENAME}}]]
+
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
 
</noinclude>
 
</noinclude>

Latest revision as of 23:32, 5 April 2020

Scripting Commands template, used by these pages.

Do NOT edit this template before heavy testing, as it is widely used!

Usage

{{Command|...parameters...}}

  • game1: (can be game or unnamed parameter 1) short game name - same as Name template input format. e.g ofp, tkoh, arma3, etc.
  • version1: (Optional, default empty (unknown)) (can be version or unnamed parameter 2) number in Template:GVI template format: <Major>.<Minor>. e.g 1.46, 1.75, 1.86 etc.
  • arg: (Optional, default empty) argument locality definition - same as EffArg template input format. e.g local, loc or global, glob
  • eff: (Optional, default empty) effects locality definition - same as EffArg template input format. e.g local, loc or global, glob
  • serverExec: (Optional, default empty) if provided, will display the Server execution icon informing the command must be run on the server
  • descr: (can be unnamed parameter 3) the command description
  • s1: (Optional, default {{PAGENAMEE}}) (can be unnamed parameter 4) command syntax with named parameters. e.g unit1 setDammage 1
  • p1..20: (Optional, default empty) command parameters with description
  • r1: (Optional, default Nothing) (can be unnamed parameter 5) syntax's return value
  • x1..10: (Optional, default {{Example needed}}) command examples (to be put between <code></code> tags where needed)
  • seealso: (Optional, default {{See also needed}}) (can be unnamed param 6) list of related links in wiki format, separated by comma or space. e.g [[setDir]] [[setPos]]
  • Secondary parameters:
    • mp: (Optional, default empty) if provided, will show a Multiplayer note under the description
    • pr: (Optional, default empty) if provided, will show a Problems note under the description
    • game2..5: (Optional, default empty) same as game1
    • version2..5: (Optional, default empty) same as version1, for the corresponding game#
    • s2..6: (Optional, default empty) Alternative syntaxes 1 to 5 (see s1)
    • p21..120: (Optional, default empty) Alternative syntaxes parameters (20 each: p21..40, p41..60, p61..80, p81..100, p101..120)
    • r2..r6: (Optional, default empty) Alternative syntaxes' return value (see r1)

Automatic categories

Full template

Show text


Example

Code Result
{{Command

<!-- Games and versions -->

|game1= ofp
|game2= arma1
|game3= arma2
|game4= arma3
|game5= tkoh
|version1= 1.46
|version2= 1.05
|version3= 1.12
|version4= 1.96
|version5= 1.10

|arg= local
|eff= global

|serverExec= server

<!-- Description and syntaxes -->

|descr= DESCRIPTION

|mp= MP BEHAVIOUR

|pr= POSSIBLE PROBLEMS

|s1= SYNTAX

|p1= PARAMETER1

|p2= PARAMETER2

|p3= PARAMETER3

|p4= PARAMETER4

|p5= PARAMETER5

|p6= PARAMETER6

|p7= PARAMETER7

|p8= PARAMETER8

|p9= PARAMETER9

|p10= PARAMETER10

|p11= PARAMETER11

|p12= PARAMETER12

|p13= PARAMETER13

|p14= PARAMETER14

|p15= PARAMETER15

|p16= PARAMETER16

|p17= PARAMETER17

|p18= PARAMETER18

|p19= PARAMETER19

|p20= PARAMETER20

|r1= RETURN_VALUE

|x1= <code>this '''command''' that</code>

|seealso=
[[Template:{{PAGENAME}}|seeAlso 1]]
[[Template:{{PAGENAME}}|seeAlso 2]]
[[Template:{{PAGENAME}}|seeAlso 3]]
[[Template:{{PAGENAME}}|seeAlso 4]]
}}
Introduced with Operation Flashpoint version 1.461.46Introduced with Armed Assault version 1.051.05Introduced with Arma 2 version 1.121.12Introduced with Arma 3 version 1.961.96Introduced with Take On Helicopters version 1.101.10Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the networkThis scripting command must be executed on the server to work properly in multiplayer
Hover & click on the images for descriptions

Description

Description:
DESCRIPTION
Multiplayer:
MP BEHAVIOUR
Problem(s):
POSSIBLE PROBLEMS

Syntax

Syntax:
SYNTAX
Parameters:
PARAMETER1
PARAMETER2
PARAMETER3
PARAMETER4
PARAMETER5
PARAMETER6
PARAMETER7
PARAMETER8
PARAMETER9
PARAMETER10
PARAMETER11
PARAMETER12
PARAMETER13
PARAMETER14
PARAMETER15
PARAMETER16
PARAMETER17
PARAMETER18
PARAMETER19
PARAMETER20
Return Value:
RETURN_VALUE

Examples

Example 1:
this command that

Additional Information

See also:
seeAlso 1 seeAlso 2 seeAlso 3 seeAlso 4

Notes

i
Only post proven facts here. Report bugs on the feedback tracker. Use the Talk page or the Forums for discussions.