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)
(196 intermediate revisions by 14 users not shown)
Line 1: Line 1:
<noinclude>This template will be removed once the test is complete</noinclude>__NOTOC__
+
<includeonly>__NOTOC__ __NOEDITSECTION__ {{DEFAULTSORT:{{uc:{{PAGENAME}}}}}}<!--
  
<div class="command_description">
+
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
  
== Dependencies ==
+
-->{{#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>
 
<dl>
<dt>Game:</dt><dd>Operation Flashpoint</dd>
+
<dt>Description:</dt>
<dt>Version:</dt><dd>{{{1|1.00}}}</dd>
+
<dd>
</dl>
+
{{{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>
 +
<dt>Syntax:</dt>
 +
<dd>{{{s1|{{{4|'''{{PAGENAMEE}}'''}}}}}}</dd><!--
 +
 
 +
-->
 +
{{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>|}}<!--
  
== Description ==
+
-->{{#if:{{{s4|}}}|
 +
<h3>Alternative Syntax 3</h3>
 
<dl>
 
<dl>
<dt>Description:</dt><dd>{{{2|}}}</dd>
+
<dt>Syntax:</dt>
</dl>
+
<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>|}}<!--
  
== Usage ==
+
-->{{#if:{{{s5|}}}|
 +
<h3>Alternative Syntax 4</h3>
 
<dl>
 
<dl>
 
<dt>Syntax:</dt>
 
<dt>Syntax:</dt>
<dd>{{{3}}}</dd>
+
<dd>{{{s5}}}</dd>|}}<!--
{{if defined call|{{{p1|}}}|param|{{{p1}}}|<dt>Parameters:</dt>}}{{if defined call|{{{p2|}}}|param|{{{p2}}}}}{{if defined call|{{{p3|}}}|param|{{{p3}}}}}
+
 
 +
-->{{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>
 
<dt>Return Value:</dt>
<dd>{{{4|None.}}}</dd>
+
<dd>{{{r5|[[Nothing]]}}}</dd>
<dt>Multiplayer:</dt>
+
</dl>|}}<!--
<dd>{{{5|Behaviour unknown.}}}</dd>
+
 
</dl>
+
-->{{#if:{{{s6|}}}|
 +
<h3>Alternative Syntax 5</h3>
 +
<dl>
 +
<dt>Syntax:</dt>
 +
<dd>{{{s6}}}</dd>|}}<!--
 +
 
 +
-->{{Command/params
 +
| {{{p101|}}} | {{{p102|}}} | {{{p103|}}} | {{{p104|}}} | {{{p105|}}} | {{{p106|}}} | {{{p107|}}} | {{{p108|}}} | {{{p109|}}} | {{{p110|}}}
 +
| {{{p111|}}} | {{{p112|}}} | {{{p113|}}} | {{{p114|}}} | {{{p115|}}} | {{{p116|}}} | {{{p117|}}} | {{{p118|}}} | {{{p119|}}} | {{{p120|}}} }}<!--
  
== Examples ==
+
-->{{#if:{{{s6|}}}|
<dl>{{if defined call|{{{ex1|}}}|example|{{{ex1}}}|<dt>Example 1:</dt>}}{{if defined call|{{{ex2|}}}|example|{{{ex2}}}|<dt>Example 2:</dt>}}{{if defined call|{{{ex3|}}}|example|{{{ex3}}}|<dt>Example 3:</dt>}}</dl>
+
<dt>Return Value:</dt>
 +
<dd>{{{r6|[[Nothing]]}}}</dd>
 +
</dl>|}}<!--
  
== Additional Information ==
+
--><h3>Examples</h3>
 +
<dl>
 +
{{Command/examples | {{{x1|}}} | {{{x2|}}} | {{{x3|}}} | {{{x4|}}} |  {{{x5|}}} | {{{x6|}}} | {{{x7|}}} | {{{x8|}}} | {{{x9|}}} | {{{x10|}}} }}
 +
</dl>
 +
<h3>Additional Information</h3>
 
<dl>
 
<dl>
<dt>See also:</dt><dd>'''{{{6|}}}'''</dd>
+
<dt>See also:</dt>
 +
<dd class="seealso">{{#if:{{{seealso|{{{6|}}}}}}
 +
|{{#replace:
 +
{{#replace:{{{seealso|{{{6}}}}}}|], [|][}}
 +
|],[|][}}
 +
|{{See also needed}}}}</dd>
 
</dl>
 
</dl>
  
== Notes ==
+
<h3>Notes</h3>
{{no-questions}}
+
<dd style="text-align: center">
<ol class="notes">
+
{{Messagebox
</ol>
+
| '''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><!--
  
</div>
+
###########################################################################
 +
##################################################
 +
#########################
 +
 
 +
 
 +
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
 +
 
 +
|arg= ARGUMENTS_LOCALITY
 +
|eff= EFFECTS_LOCALITY
 +
 
 +
|serverExec= MP_EXECUTION
 +
 
 +
<!-- 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
 +
 
 +
<!-- 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
 +
}}
 +
 
 +
<h3 style="display:none">Bottom Section</h3>
 +
<!-- Appropriate categories go here e.g. [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] -->
 +
</syntaxhighlight>
 +
</spoiler>
 +
 
 +
== Example ==
 +
 
 +
{| class="wikitable"
 +
! Code
 +
! Result
 +
|-
 +
| <syntaxhighlight lang="html">{{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]]
 +
}}</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
 +
 
 +
|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]]
 +
}}
 +
|}
 +
 
 +
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
 +
</noinclude>

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.