BIS fnc assignPlayerRole: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (template:command argument fix)
Line 14: Line 14:
| [vehicle, role, path] call [[BIS_fnc_assignPlayerRole]] |SYNTAX=
| [vehicle, role, path] call [[BIS_fnc_assignPlayerRole]] |SYNTAX=


|p1= vehicle: [[Object]] - targeted vehicle |= Parameter 1
|p1= vehicle: [[Object]] - targeted vehicle |PARAMETER1=


|p2= role: [[String]] - can be one of:
|p2= role: [[String]] - can be one of:
Line 21: Line 21:
* "commander"
* "commander"
* "cargo"
* "cargo"
* "turret" |= Parameter 2
* "turret" |PARAMETER2=


|p3= path: [[Array]] or [[Number]] - the turret path |= Parameter 3
|p3= path: [[Array]] or [[Number]] - the turret path |PARAMETER3=


| [[Boolean]] - [[true]] when done |RETURNVALUE=
| [[Boolean]] - [[true]] when done |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[myVehicle, "turret", [0, 1]] [[call]] [[BIS_fnc_assignPlayerRole]];</code> |= Example 1
|x1= <code>[myVehicle, "turret", [0, 1]] [[call]] [[BIS_fnc_assignPlayerRole]];</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 14:28, 7 April 2019

Hover & click on the images for description

Description

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

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 Number - the turret path
Return Value:
Boolean - true when done

Examples

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

Additional Information

See also:
assignAsDriverassignAsGunnerassignAsCommanderassignAsCargoassignAsTurret

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