BIS fnc moveIn: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Some wiki formatting)
 
(42 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>/*
|arg= local


Description:
|descr= Moves a unit into vehicle. Compatible with [[assignedVehicleRole]] output.
Moves a unit into vehicle. Compatible with assignedVehicleRole output.


Parameter(s):
|s1= [vehicle, unit, role] call [[BIS_fnc_moveIn]]
_this select 0: OBJECT - vehicle
_this select 1: OBJECT - unit
_this select 2: ARRAY - role in format [name] or [name,position]


Returns:
|p1= vehicle: [[Object]]
BOOL - true if moved in succesfully
*/
#define BIS_FNC_MOVEIN_ERROR_NOSPACE \
["No positions of type '%1' empty in %2",_roleName,_veh] call bis_fnc_error; \
false


|p2= unit: [[Object]] - the unit to move into ''vehicle'' - must be [[Multiplayer Scripting#Locality|local]]


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p3= 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]])


| <!-- [] call [[BIS_fnc_moveIn]]; --> |= Syntax
|r1= [[Boolean]] - [[true]] if moved in successfully


|p1= |= Parameter 1
|x1= <sqf>[myCar, player, "cargo"] call BIS_fnc_moveIn;</sqf>


| |= Return value
|x2= <sqf>[myTank, player, ["turret", [0]]] call BIS_fnc_moveIn;</sqf>
____________________________________________________________________________________________


|x1= <code></code> |=
|x3= <sqf>[myTank, player, ["turret", -1]] call BIS_fnc_moveIn; // will moveInDriver the player</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[moveInDriver]] [[moveInGunner]] [[moveInCommander]] [[moveInCargo]] [[moveInTurret]] [[moveInAny]]
}}
}}
<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:moveIn}}]]
[[Category:Functions|{{uc:moveIn}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:moveIn}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:moveIn}}]]

Latest revision as of 23:05, 12 July 2022

Hover & click on the images for description

Description

Description:
Moves a unit into vehicle. Compatible with assignedVehicleRole output.
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
[vehicle, unit, role] call BIS_fnc_moveIn
Parameters:
vehicle: Object
unit: Object - the unit to move into vehicle - must be local
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:
moveInDriver moveInGunner moveInCommander moveInCargo moveInTurret moveInAny

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