assignedVehicleRole: Difference between revisions
Jump to navigation
Jump to search
m (Bot: Replacing category Scripting Commands Arma 3 with Arma 3: Scripting Commands) |
m (Bot: Reverted to revision 108912 by killzone_kid on 2018-07-22T19:18:58Z) |
||
Line 50: | Line 50: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Command_Group:_Vehicle_Assignment|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | |||
<!-- CONTINUE Notes --> | <!-- CONTINUE Notes --> | ||
<dl class="command_description"> | <dl class="command_description"> | ||
Line 63: | Line 72: | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> | ||
Revision as of 18:09, 3 December 2018
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"] (or ["Cargo", [turret path]] since Arma 3 1.31.127272) - Assigned as cargo
- ["Turret", [turret path]] - Assigned to a turret
- Groups:
- Uncategorised
Syntax
- Syntax:
- assignedVehicleRole unitName
- Parameters:
- unitName: Object
- Return Value:
- Array - array in one of the formats described in description
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:
- addVehicleassignedVehicleunassignVehicleweaponsTurretassignAsCargoassignAsCommanderassignAsDriverassignAsGunnerassignAsTurretcrewfullCrew
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.
To add, when player is in the group of AIs and is not the leader, assignedVehicleRole of the player could be unpredictable and absolutely not related to the position player occupies. In short, forget about this command, it is unreliable and has been broken too many times in the past.
Bottom Section
- Posted on November 15, 2014 - 23:31 (UTC)
- Tajin
-
In multiplayer (tested in v1.34), this only works reliably on the server.
Behaviour is as follows:
On a client, the command will return empty arrays for every unit that is not local.
On the server, the command correctly returns the position, regardless of the units locality.
Categories:
- Scripting Commands
- Introduced with Arma version 1.05
- Arma: New Scripting Commands
- Arma: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands ArmA
- Command Group: Object Information
- Command Group: Vehicle Assignment
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters