assignedVehicleRole: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(locality corrected)
Line 6: Line 6:
|1.05|= Game version
|1.05|= Game version


|arg= local |= Arguments in MP
|arg= global |= Arguments in MP
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 29: Line 29:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>_RoleArray=assignedVehicleRole player</pre> |= Example 1
|x1= <code>_RoleArray = [[assignedVehicleRole]] [[player]];</code> |= Example 1
|x2= <pre>_weaponsForAnyTurrentPosition = (vehicle player) weaponsTurret ((assignedVehicleRole player) select 1)</pre> |= Example 2
|x2= Get weapons available to player at player occupied turret:<code>_weaponsTurret = [[vehicle]] [[player]] [[weaponsTurret]] ([[assignedVehicleRole]] [[player]] [[select]] 1);</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 15:03, 6 December 2013

-wrong parameter ("Arma") defined!-1.05
Hover & click on the images for description

Description

Description:
Return the role a unit is assigned to within its assigned vehicle. The array which is returned contains:
  • [] - Not assigned to any vehicle
  • ["Driver"] - Assigned as driver
  • ["Cargo"] - Assigned as cargo
  • ["Turret", [turret path]] - Assigned to a turret
If no vehicle role is assigned, an empty array is returned.
Groups:
Uncategorised

Syntax

Syntax:
Array = assignedVehicleRole unitName
Parameters:
unitName: Object
Return Value:
Array

Examples

Example 1:
_RoleArray = assignedVehicleRole player;
Example 2:
Get weapons available to player at player occupied turret:_weaponsTurret = vehicle player weaponsTurret (assignedVehicleRole player select 1);

Additional Information

See also:
addVehicleassignedVehicleunassignVehicleweaponsTurretassignAsCargoassignAsCommanderassignAsDriverassignAsGunnerassignAsTurret

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

Posted on August 31, 2013
Killzone_Kid
When unit with unassigned vehicle role enters a vehicle, it gets assigned vehicle role automatically. The unit then will hold on to its assigned role after exiting the vehicle.

Bottom Section