BIS fnc objectVar: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Objects(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 7: | Line 6: | ||
|gr1 = Object Manipulation |GROUP1= | |gr1 = Object Manipulation |GROUP1= | ||
| Return a unique object variable. The variable is preserved after unit respawn. |Description= | | Return a unique object variable. The variable is preserved after unit respawn. |Description= | ||
| [object'', varNameRoot''] call [[BIS_fnc_objectVar]] |Syntax= | | [object'', varNameRoot''] call [[BIS_fnc_objectVar]] |Syntax= | ||
Line 19: | Line 16: | ||
| [[String]] - generated variable name |Return value= | | [[String]] - generated variable name |Return value= | ||
|x1= <code>[[hint]] [[str]] ([[player]] [[call]] [[BIS_fnc_objectVar]]); {{codecomment|// "bis_o1"}} | |x1= <code>[[hint]] [[str]] ([[player]] [[call]] [[BIS_fnc_objectVar]]); {{codecomment|// "bis_o1"}} | ||
[[hint]] [[str]] ([[player]] == ([[missionNamespace]] [[getVariable]] "bis_o1")); {{codecomment|// true}}</code> |Example 1= | [[hint]] [[str]] ([[player]] == ([[missionNamespace]] [[getVariable]] "bis_o1")); {{codecomment|// true}}</code> |Example 1= | ||
| [[netId]], [[objectFromNetId]], [[setVariable]], [[setVehicleVarName]] |See also= | | [[netId]], [[objectFromNetId]], [[setVariable]], [[setVehicleVarName]] |See also= |
Revision as of 23:54, 16 January 2021
Description
- Description:
- Return a unique object variable. The variable is preserved after unit respawn.
- Execution:
- call
- Groups:
- Object Manipulation
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_o1" hint str (player == (missionNamespace getVariable "bis_o1")); // true
Additional Information
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