BIS fnc objectVar: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1 = Object Manipulation | |gr1 = Object Manipulation | ||
| Return a unique object variable. The variable is preserved after unit respawn. | | Return a unique object variable. The variable is preserved after unit respawn. | ||
| [object'', varNameRoot''] call [[BIS_fnc_objectVar]] | | [object'', varNameRoot''] call [[BIS_fnc_objectVar]] | ||
|p1= object: [[Object]] | |p1= object: [[Object]] | ||
|p2= varNameRoot: [[String]] - (Optional, default "bis_o") - variable name root - a number will be added behind it | |p2= varNameRoot: [[String]] - (Optional, default "bis_o") - variable name root - a number will be added behind it | ||
| [[String]] - generated variable name | | [[String]] - generated variable name | ||
|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> | [[hint]] [[str]] ([[player]] == ([[missionNamespace]] [[getVariable]] "bis_o1")); {{codecomment|// true}}</code> | ||
| [[netId]], [[objectFromNetId]], [[setVariable]], [[setVehicleVarName]] | | [[netId]], [[objectFromNetId]], [[setVariable]], [[setVehicleVarName]] | ||
}} | }} | ||
Revision as of 23:39, 17 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