BIS fnc moveIn: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling)
m (template:command argument fix)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Moves a unit into vehicle. Compatible with [[assignedVehicleRole]] output. |= Description
| Moves a unit into vehicle. Compatible with [[assignedVehicleRole]] output. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [vehicle, unit, role] call [[BIS_fnc_moveIn]] |= Syntax
| [vehicle, unit, role] call [[BIS_fnc_moveIn]] |SYNTAX=


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


|p2= unit: [[Object]] - the unit to move into ''vehicle'' |= Parameter 2
|p2= unit: [[Object]] - the unit to move into ''vehicle'' |PARAMETER2=


|p3= role: [[Array]] - wanted seat, in format [''"role"''] or [''"role"'', turretPath]. Can be one of:
|p3= role: [[Array]] - wanted seat, in format [''"role"''] or [''"role"'', turretPath]. Can be one of:
Line 24: Line 24:
* "cargo"
* "cargo"
* "turret"
* "turret"
* "": will load ''unit'' in the first available seat (using [[moveInAny]]) |= Parameter 3
* "": will load ''unit'' in the first available seat (using [[moveInAny]]) |PARAMETER3=


| [[Boolean]] - [[true]] if moved in successfully |= Return value
| [[Boolean]] - [[true]] if moved in successfully |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[myCar, [[player]], "cargo"] [call]] [[BIS_fnc_moveIn]];</code> |= Example 1
|x1= <code>[myCar, [[player]], "cargo"] [call]] [[BIS_fnc_moveIn]];</code> |EXAMPLE1=


|x2= <code>[myTank, [[player]], ["turret", [0]]] [call]] [[BIS_fnc_moveIn]];</code> |= Example 2
|x2= <code>[myTank, [[player]], ["turret", [0]]] [call]] [[BIS_fnc_moveIn]];</code> |EXAMPLE2=


|x3= <code>[myTank, [[player]], ["turret", -1]] [call]] [[BIS_fnc_moveIn]]; {{codecomment|// will [[moveInDriver]] the player}}</code> |= Example 3
|x3= <code>[myTank, [[player]], ["turret", -1]] [call]] [[BIS_fnc_moveIn]]; {{codecomment|// will [[moveInDriver]] the player}}</code> |EXAMPLE3=
____________________________________________________________________________________________
____________________________________________________________________________________________


|mp= ''unit'' must be '''[[local]]''' |= Multiplayer
|mp= ''unit'' must be '''[[local]]''' |= Multiplayer


| [[moveInDriver]], [[moveInGunner]], [[moveInCommander]], [[moveInCargo]], [[moveInTurret]], [[moveInAny]] |= See also
| [[moveInDriver]], [[moveInGunner]], [[moveInCommander]], [[moveInCargo]], [[moveInTurret]], [[moveInAny]] |SEEALSO=
}}
}}



Revision as of 14:32, 7 April 2019

Hover & click on the images for description

Description

Description:
Moves a unit into vehicle. Compatible with assignedVehicleRole output.
Execution:
call
Multiplayer:
unit must be local
Groups:
Uncategorised

Syntax

Syntax:
[vehicle, unit, role] call BIS_fnc_moveIn
Parameters:
vehicle: Object
unit: Object - the unit to move into vehicle
role: Array - wanted seat, in format ["role"] or ["role", turretPath]. Can be one of:
  • "driver"
  • "gunner"
  • "commander"
  • "cargo"
  • "turret"
  • "": will load unit in the first available seat (using moveInAny)
Return Value:
Boolean - true if moved in successfully

Examples

Example 1:
[myCar, player, "cargo"] [call]] BIS_fnc_moveIn;
Example 2:
[myTank, player, ["turret", [0]]] [call]] BIS_fnc_moveIn;
Example 3:
[myTank, player, ["turret", -1]] [call]] BIS_fnc_moveIn; // will moveInDriver the player

Additional Information

See also:
moveInDrivermoveInGunnermoveInCommandermoveInCargomoveInTurretmoveInAny

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