BIS fnc objectVar: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>") |
||
(22 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| arma3 | | |game1= arma3 | ||
|version1= 1.00 | |||
| | |gr1= Object Manipulation | ||
| | |descr= Return a unique object variable. The variable is preserved after unit respawn. | ||
| | |s1= [object, varNameRoot] call [[BIS_fnc_objectVar]] | ||
| | |p1= object: [[Object]] | ||
| | |p2= varNameRoot: [[String]] - (Optional, default "bis_o") - variable name root - a number will be added behind it | ||
| | |r1= [[String]] - generated variable name | ||
| | |x1= <sqf>hint str (player call BIS_fnc_objectVar); // "bis_o1" | ||
hint str (player == (missionNamespace getVariable "bis_o1")); // true</sqf> | |||
| | |seealso= [[netId]] [[objectFromNetId]] [[setVariable]] [[setVehicleVarName]] | ||
}} | }} | ||
Latest revision as of 17:00, 13 July 2022
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
- See also:
- netId objectFromNetId setVariable setVehicleVarName
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