BIS fnc assignPlayerRole: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "<code> *([^<|{]*) *<\/code>" to "<sqf>$1</sqf>")
 
(33 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= tkoh
____________________________________________________________________________________________
|version1= 1.00


| tkoh |= Game name
|game2= arma3
|version2= 0.50


|1.00|= Game version
|gr1= Object Manipulation
____________________________________________________________________________________________


| <pre>/*
|eff= local


Description:
|descr= Ensures the player can only get in the specific vehicle role.
Ensures the player can only get in the specific vehicle role


Parameter(s):
|s1= [vehicle, role, path] call [[BIS_fnc_assignPlayerRole]]
_this select 0: vehicle (Object)
_this select 1: role (String)
_this select 2: index / path (Scalar or Array)


Returns:
|p1= vehicle: [[Object]] - targeted vehicle
Bool
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p2= role: [[String]] - can be one of:
____________________________________________________________________________________________
* "driver"
* "gunner"
* "commander"
* "cargo"
* "turret"


| <!-- [] call [[BIS_fnc_assignPlayerRole]]; --> |= Syntax
|p3= path: [[Array]] or [[Number]]s - the turret path


|p1= |= Parameter 1
|r1= [[Boolean]] - [[true]] when done


| |= Return value
|x1= <sqf>[myVehicle, "turret", [0, 1]] call BIS_fnc_assignPlayerRole;</sqf>
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[assignAsDriver]] [[assignAsGunner]] [[assignAsCommander]] [[assignAsCargo]] [[assignAsTurret]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:assignPlayerRole}}]]
[[Category:Functions|{{uc:assignPlayerRole}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:assignPlayerRole}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:assignPlayerRole}}]]

Latest revision as of 22:44, 12 July 2022

Hover & click on the images for description

Description

Description:
Ensures the player can only get in the specific vehicle role.
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
[vehicle, role, path] call BIS_fnc_assignPlayerRole
Parameters:
vehicle: Object - targeted vehicle
role: String - can be one of:
  • "driver"
  • "gunner"
  • "commander"
  • "cargo"
  • "turret"
path: Array or Numbers - the turret path
Return Value:
Boolean - true when done

Examples

Example 1:
[myVehicle, "turret", [0, 1]] call BIS_fnc_assignPlayerRole;

Additional Information

See also:
assignAsDriver assignAsGunner assignAsCommander assignAsCargo assignAsTurret

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