BIS fnc objectVar: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision imported: BIS Functions update 2/7)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 |= Game name
| arma3 |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Return a unique object variable. The variable is preserved after unit respawn. |Description=
 
____________________________________________________________________________________________
Description:
Return an unique object variable.
The variable is preserved after unit respawn.
 
Parameter(s):
0: OBJECT
1 (Optional): STRING - variable name (number will be added behind it)
 
Returns:
STRING
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
| [object'', varNameRoot''] call [[BIS_fnc_objectVar]] |Syntax=
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_objectVar]]; --> |= Syntax
|p1= object: [[Object]] |Parameter 1=


|p1= |= Parameter 1
|p2= varNameRoot: [[String]] - (Optional, default "bis_o") - variable name root - a number will be added behind it |Parameter 2=


| |= Return value
| [[String]] - generated variable name |Return value=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[[hint]] [[str]] ([[player]] [[call]] [[BIS_fnc_objectVar]]); //"BIS_fnc_objectVar_obj1"<br>[[hint]] [[str]] ([[player]] == ([[missionNamespace]] [[getVariable]] "BIS_fnc_objectVar_obj1")); //true</code> |=  
|x1= <code>[[hint]] [[str]] ([[player]] [[call]] [[BIS_fnc_objectVar]]); {{codecomment|// "BIS_fnc_objectVar_obj1"}}
[[hint]] [[str]] ([[player]] == ([[missionNamespace]] [[getVariable]] "BIS_fnc_objectVar_obj1")); {{codecomment|// true}}</code> |Example 1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[netId]], [[objectFromNetId]]|= See also
| [[netId]], [[objectFromNetId]], [[setVariable]], [[setVehicleVarName]] |See also=
 
}}
}}


Line 46: Line 34:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:objectVar}}]]
[[Category:Function Group: Objects|{{uc:objectVar}}]]
[[Category:Function Group: Objects|{{uc:objectVar}}]]
[[Category:Functions|{{uc:objectVar}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:objectVar}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:objectVar}}]]

Revision as of 15:04, 6 June 2018

Hover & click on the images for description

Description

Description:
Return a unique object variable. The variable is preserved after unit respawn.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[object, varNameRoot] call BIS_fnc_objectVar
Parameters:
object: Object
varNameRoot: String - (Optional, default "bis_o") - variable name root - a number will be added behind it
Return Value:
String - generated variable name

Examples

Example 1:
hint str (player call BIS_fnc_objectVar); // "BIS_fnc_objectVar_obj1" hint str (player == (missionNamespace getVariable "BIS_fnc_objectVar_obj1")); // true

Additional Information

See also:
netIdobjectFromNetIdsetVariablesetVehicleVarName

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

Notes

Bottom Section