BIS fnc spawn: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (linked <code> + added "exec" as "spawn" (correct?) + bolded syntax + completed page layout per template documentation)
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [params, code] spawn BIS_fnc_spawn; |= Syntax
| [params, code] spawn '''BIS_fnc_spawn'''; |= Syntax


|p1= '''params''': [[Anything]] - function arguments |=
|p1= '''params''': [[Anything]] - function arguments |= Parameter 1
|p2= '''functionCode''': [[Code]] - function code |=
|p2= '''functionCode''': [[Code]] - function code |= Parameter 2


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
|exec= spawn |= Execution By (defaults to [[call]] if omitted)
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code><nowiki>[</nowiki><nowiki>[</nowiki>"Hello"],{hint _this select 0}] spawn BIS_fnc_spawn;</code>
|x1= Show a message for the current player.
show a message for the current player. |=
<code>[ ["Hello"], { [[hint]] [[_this]] [[select]] 0 } ] [[spawn]] [[BIS_fnc_spawn]];</code> |= Example 1
____________________________________________________________________________________________
   
   
|x2= <code><nowiki>[</nowiki><nowiki>[</nowiki>"Hello"],{hint _this select 0},"BIS_fnc_spawn",true,false,false] spawn [[BIS_fnc_MP]];</code>
|x2= Show a message to all connected players.
Show a message to all connected players. |=
<code>[ ["Hello"], { [[hint]] [[_this]] [[select]] 0 }, "[[BIS_fnc_spawn]]", [[true]], [[false]], [[false]] ] [[spawn]] [[BIS_fnc_MP]];</code> |= Example 2
____________________________________________________________________________
____________________________________________________________________________


Line 29: Line 32:
}}
}}


<!-- BEGIN Note Section -->
<dl class="command_description">
<!-- 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>
Isn't that awesome?!</dd> -->
</dl>
<!-- END Note Section -->
<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here e.g. [[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]] -->
[[Category:Arma 3:_Functions|mp]]
[[Category:Arma 3:_Functions|mp]]

Revision as of 07:17, 27 April 2014

Hover & click on the images for description

Description

Description:
Execute given code with or without parameter.
Execution:
spawn
Groups:
Uncategorised

Syntax

Syntax:
[params, code] spawn BIS_fnc_spawn;
Parameters:
params: Anything - function arguments
functionCode: Code - function code
Return Value:
Nothing

Examples

Example 1:
Show a message for the current player. [ ["Hello"], { hint _this select 0 } ] spawn BIS_fnc_spawn;
Example 2:
Show a message to all connected players. [ ["Hello"], { hint _this select 0 }, "BIS_fnc_spawn", true, false, false ] spawn BIS_fnc_MP;

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Bottom Section