Difference between revisions of "Template:Function"
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix won't work; {{#replace}} does not work yet) |
Lou Montana (talk | contribs) m (Remove style from template) |
||
Line 3: | Line 3: | ||
-->__NOEDITSECTION__<!-- | -->__NOEDITSECTION__<!-- | ||
-->{{DISPLAYTITLE:{{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:FUNCTION | {{FULLPAGENAMEE}} | {{PAGENAMEE}} }} }}<!-- | -->{{DISPLAYTITLE:{{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:FUNCTION | {{FULLPAGENAMEE}} | {{PAGENAMEE}} }} }}<!-- | ||
− | -->{{DEFAULTSORT:{{#replace:{{uc:{{PAGENAMEE}}}}|VN_FNC_| | + | -->{{DEFAULTSORT:{{#replace:{{uc:{{PAGENAMEE}}}}|VN_FNC_|}}}}<!-- |
-->{{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:FUNCTION | | [[Category:Functions]]{{#if:{{{v|}}}|[[Category:Introduced in v{{{v}}}]]}}}}<!-- | -->{{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:FUNCTION | | [[Category:Functions]]{{#if:{{{v|}}}|[[Category:Introduced in v{{{v}}}]]}}}}<!-- | ||
--><div class="function"> | --><div class="function"> | ||
Line 14: | Line 14: | ||
|} | |} | ||
{{#if:{{{v|}}}{{{d|}}}| | {{#if:{{{v|}}}{{{d|}}}| | ||
− | <h2 | + | <h2 id="Description">Description</h2> |
{{#if:{{{d|}}}|{{{d}}}}} | {{#if:{{{d|}}}|{{{d}}}}} | ||
}} | }} | ||
{{#if:{{{s|}}}| | {{#if:{{{s|}}}| | ||
− | < | + | <h2id="Syntax">Syntax</h2> |
<dl> | <dl> | ||
− | <dt | + | <dt>Syntax</dt> |
− | <dd | + | <dd>{{{s}}}</dd> |
{{#if:{{{p1n|}}}| | {{#if:{{{p1n|}}}| | ||
− | <dt | + | <dt>Parameters</dt> |
− | <dd | + | <dd>{{{p1n}}}{{#if:{{{p1t|}}}|<nowiki/>: {{DataType|{{{p1t}}}}}}}{{#if:{{{p1d|}}}{{{p1v|}}}|<nowiki/> - {{#if:{{{p1v|}}}|<nowiki/> (Optional, default <code>{{{p1v}}}</code>)}}{{#if:{{{p1d|}}}|<nowiki/> {{{p1d}}}}}}}</dd><!-- |
− | -->{{#if:{{{p2n|}}}|<dd | + | -->{{#if:{{{p2n|}}}|<dd>{{{p2n}}}{{#if:{{{p2t|}}}|<nowiki/>: {{DataType|{{{p2t}}}}}}}{{#if:{{{p2d|}}}{{{p2v|}}}|<nowiki/> - {{#if:{{{p2v|}}}|<nowiki/> (Optional, default <code>{{{p2v}}}</code>)}}{{#if:{{{p2d|}}}|<nowiki/> {{{p2d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p3n|}}}|<dd | + | -->{{#if:{{{p3n|}}}|<dd>{{{p3n}}}{{#if:{{{p3t|}}}|<nowiki/>: {{DataType|{{{p3t}}}}}}}{{#if:{{{p3d|}}}{{{p3v|}}}|<nowiki/> - {{#if:{{{p3v|}}}|<nowiki/> (Optional, default <code>{{{p3v}}}</code>)}}{{#if:{{{p3d|}}}|<nowiki/> {{{p3d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p4n|}}}|<dd | + | -->{{#if:{{{p4n|}}}|<dd>{{{p4n}}}{{#if:{{{p4t|}}}|<nowiki/>: {{DataType|{{{p4t}}}}}}}{{#if:{{{p4d|}}}{{{p4v|}}}|<nowiki/> - {{#if:{{{p4v|}}}|<nowiki/> (Optional, default <code>{{{p4v}}}</code>)}}{{#if:{{{p4d|}}}|<nowiki/> {{{p4d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p5n|}}}|<dd | + | -->{{#if:{{{p5n|}}}|<dd>{{{p5n}}}{{#if:{{{p5t|}}}|<nowiki/>: {{DataType|{{{p5t}}}}}}}{{#if:{{{p5d|}}}{{{p5v|}}}|<nowiki/> - {{#if:{{{p5v|}}}|<nowiki/> (Optional, default <code>{{{p5v}}}</code>)}}{{#if:{{{p5d|}}}|<nowiki/> {{{p5d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p6n|}}}|<dd | + | -->{{#if:{{{p6n|}}}|<dd>{{{p6n}}}{{#if:{{{p6t|}}}|<nowiki/>: {{DataType|{{{p6t}}}}}}}{{#if:{{{p6d|}}}{{{p6v|}}}|<nowiki/> - {{#if:{{{p6v|}}}|<nowiki/> (Optional, default <code>{{{p6v}}}</code>)}}{{#if:{{{p6d|}}}|<nowiki/> {{{p6d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p7n|}}}|<dd | + | -->{{#if:{{{p7n|}}}|<dd>{{{p7n}}}{{#if:{{{p7t|}}}|<nowiki/>: {{DataType|{{{p7t}}}}}}}{{#if:{{{p7d|}}}{{{p7v|}}}|<nowiki/> - {{#if:{{{p7v|}}}|<nowiki/> (Optional, default <code>{{{p7v}}}</code>)}}{{#if:{{{p7d|}}}|<nowiki/> {{{p7d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p8n|}}}|<dd | + | -->{{#if:{{{p8n|}}}|<dd>{{{p8n}}}{{#if:{{{p8t|}}}|<nowiki/>: {{DataType|{{{p8t}}}}}}}{{#if:{{{p8d|}}}{{{p8v|}}}|<nowiki/> - {{#if:{{{p8v|}}}|<nowiki/> (Optional, default <code>{{{p8v}}}</code>)}}{{#if:{{{p8d|}}}|<nowiki/> {{{p8d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p9n|}}}|<dd | + | -->{{#if:{{{p9n|}}}|<dd>{{{p9n}}}{{#if:{{{p9t|}}}|<nowiki/>: {{DataType|{{{p9t}}}}}}}{{#if:{{{p9d|}}}{{{p9v|}}}|<nowiki/> - {{#if:{{{p9v|}}}|<nowiki/> (Optional, default <code>{{{p9v}}}</code>)}}{{#if:{{{p9d|}}}|<nowiki/> {{{p9d}}}}}}}</dd>}}<!-- |
− | -->{{#if:{{{p10n|}}}|<dd | + | -->{{#if:{{{p10n|}}}|<dd>{{{p10n}}}{{#if:{{{p10t|}}}|<nowiki/>: {{DataType|{{{p10t}}}}}}}{{#if:{{{p10d|}}}{{{p10v|}}}|<nowiki/> - {{#if:{{{p10v|}}}|<nowiki/> (Optional, default <code>{{{p10v}}}</code>)}}{{#if:{{{p10d|}}}|<nowiki/> {{{p10d}}}}}}}</dd>}} |
}} | }} | ||
− | {{#if:{{{r1t|}}}{{{r1d|}}}|<dt | + | {{#if:{{{r1t|}}}{{{r1d|}}}|<dt>Return value:</dt><dd>{{#if:{{{r1t|}}}|{{DataType|{{{r1t}}}}}{{#if:{{{r1d|}}}|<nowiki> - </nowiki>}}}}{{{r1d|}}}</dd>}} |
</dl> | </dl> | ||
}} | }} | ||
{{#if:{{{x1|}}}| | {{#if:{{{x1|}}}| | ||
− | <h2 | + | <h2 id="Examples">Examples</h2> |
<dl> | <dl> | ||
− | <dt | + | <dt>Example 1:</dt><dd>{{{x1}}}</dt> |
− | {{#if:{{{x2|}}}|<dt | + | {{#if:{{{x2|}}}|<dt>Example 2:</dt><dd>{{{x2}}}</dd>}} |
− | {{#if:{{{x3|}}}|<dt | + | {{#if:{{{x3|}}}|<dt>Example 3:</dt><dd>{{{x3}}}</dd>}} |
− | {{#if:{{{x4|}}}|<dt | + | {{#if:{{{x4|}}}|<dt>Example 4:</dt><dd>{{{x4}}}</dd>}} |
− | {{#if:{{{x5|}}}|<dt | + | {{#if:{{{x5|}}}|<dt>Example 5:</dt><dd>{{{x5}}}</dd>}} |
− | {{#if:{{{x6|}}}|<dt | + | {{#if:{{{x6|}}}|<dt>Example 6:</dt><dd>{{{x6}}}</dd>}} |
− | {{#if:{{{x7|}}}|<dt | + | {{#if:{{{x7|}}}|<dt>Example 7:</dt><dd>{{{x7}}}</dd>}} |
− | {{#if:{{{x8|}}}|<dt | + | {{#if:{{{x8|}}}|<dt>Example 8:</dt><dd>{{{x8}}}</dd>}} |
− | {{#if:{{{x9|}}}|<dt | + | {{#if:{{{x9|}}}|<dt>Example 9:</dt><dd>{{{x9}}}</dd>}} |
− | {{#if:{{{x10|}}}|<dt | + | {{#if:{{{x10|}}}|<dt>Example 10:</dt><dd>{{{x10}}}</dd>}} |
</dl> | </dl> | ||
}} | }} |
Revision as of 17:15, 20 May 2020
Shows a Function page, adds it to the Category:Functions page and the Category:Introduced in.
Usage
{{Function|arg1=value}}
Argument | Name | Description |
---|---|---|
v | Version | S.O.G. Prairie Fire's version. Note: not Arma 3 version! |
a | Arguments locality | l, loc or local for local arguments, g, glob or global for global arguments |
e | Effect(s) locality | same as a for effect(s) locality |
d | Description | Function summary, e.g Sets provided unit's direction. |
s | Syntax | e.g <code>[unit, 45] call [[VN_fnc_setDir]];</code> |
Parameters - p1..10 | ||
p1n | Parameter 1 name (identifier) | e.g unit, dir, etc. |
p1t | Parameter 1 type | String, Number, etc. Note: no need to use wiki formatting (like [[String]] ) - simply type s, str or string - see Template:DataType for possible values.
|
p1d | Parameter 1 description | e.g Sets unit's direction. |
p1v | Parameter 1 default value | e.g 10 |
Return value - r1..5 | ||
r1t | Returned value type | e.g Number - same note as p1t |
r1d | Returned value description | e.g Angle set |
Examples - x1..10 | ||
x1 | Example 1 | e.g <code>[player, 45] call [[VN_fnc_setDir]]</code>. Note: be sure to use the HTML <code></code> tags around code. |
Template{{Function |v= 1.00 |a= argumentsLocality |e= effectsLocality |d= DESCRIPTION |s= [] call [[FUNCTION]] |p1n= identifier |p1t= type |p1d= description |p1v= defaultValue |p2n= identifier |p2t= type |p2d= description |p2v= defaultValue |r1t= type |r1d= description |x1= example1 }} |
Example{{Function |v= 1.00 |a= loc |e= global |d= Sets provided unit's direction. |s= [unit, direction] call [[VN_fnc_setDir]] |p1n= unit |p1t= object |p1d= the unit to sets direction |p1v= objNull |p2n= direction |p2t= number |p2d= the direction value |p2v= 0 |r1t= number |r1d= set direction |x1= <code>[player, 45] call [[VN_fnc_setDir]];</code> }} |
Result
Result is in a grey border to separate it from this page.
← back to Functions | Introduced in S.O.G. Prairie Fire v1.00 | Argument(s): local |
Description
Sets provided unit's direction.
<h2id="Syntax">Syntax- Syntax
- [unit, direction] call VN_fnc_setDir
- Parameters
- unit: Object - (Optional, default
objNull
) the unit to sets direction - direction: Number - (Optional, default
0
) the direction value - Return value:
- Number - set direction
Examples
- Example 1:
[player, 45] call VN_fnc_setDir;