moveOut: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (again)
(example, format, seealso)
Line 14: Line 14:
| '''moveOut''' soldier |= Syntax
| '''moveOut''' soldier |= Syntax


|p1= soldier: [[Object]] - |= PARAMETER1  
|p1= soldier: [[Object]]  |= PARAMETER1  


|p2= |= PARAMETER2  
|p2= |= PARAMETER2  
Line 20: Line 20:
|p3= |= PARAMETER3  
|p3= |= PARAMETER3  


| Nothing |= RETURNVALUE  
| [[Nothing]] |= RETURNVALUE  




|x1= <pre>if ((lifeState _x) == "UNCONSCIOUS") then {moveOut _x;};} forEach (crew cursorTarget);</pre>|= EXAMPLE1  
|x1= <code>[[if]] ([[lifeState]] _x == "UNCONSCIOUS") [[then]] {[[moveOut]] _x;};} [[forEach]] [[crew]] [[cursorTarget]];</code>|= EXAMPLE1  


|x2= Move out player just before he dies:<code>[[player]] [[addEventHandler]] [
"HandleDamage",
[[format]] [
'[[if]] ([[switch]] (_this [[select]] 1) [[do]] {
[[case]] "": {_this [[select]] 2 >= 1};
[[case]] "head": {_this [[select]] 2 >= %1};
[[case]] "body": {_this [[select]] 2 >= %2};
[[default]] {false};
}) [[then]] {[[moveOut]] [[player]]}',
[[getNumber]] ([[configFile]] >> "CfgFirstAid" >> "CriticalHeadHit"),
[[getNumber]] ([[configFile]] >> "CfgFirstAid" >> "CriticalBodyHit")
]
];</code>|= EXAMPLE2
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[action]], [[doGetOut]], [[commandGetOut]], [[leaveVehicle]] |= SEEALSO  
| [[action]], [[moveInDriver]], [[moveInGunner]], [[moveInCommander]], [[moveInTurret]], [[moveInCargo]], [[doGetOut]], [[commandGetOut]], [[leaveVehicle]] |= SEEALSO  


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 17:15, 4 March 2015

Hover & click on the images for description

Description

Description:
Moves the soldier out of vehicle. (Immediately,without animation).
Groups:
Uncategorised

Syntax

Syntax:
moveOut soldier
Parameters:
soldier: Object
Return Value:
Nothing

Examples

Example 1:
if (lifeState _x == "UNCONSCIOUS") then {moveOut _x;};} forEach crew cursorTarget;
Example 2:
Move out player just before he dies:player addEventHandler [ "HandleDamage", format [ 'if (switch (_this select 1) do { case "": {_this select 2 >= 1}; case "head": {_this select 2 >= %1}; case "body": {_this select 2 >= %2}; default {false}; }) then {moveOut player}', getNumber (configFile >> "CfgFirstAid" >> "CriticalHeadHit"), getNumber (configFile >> "CfgFirstAid" >> "CriticalBodyHit") ] ];

Additional Information

See also:
actionmoveInDrivermoveInGunnermoveInCommandermoveInTurretmoveInCargodoGetOutcommandGetOutleaveVehicle

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 September 12, 2010
kju
Seems to work only for unconscious - NOT for dead bodies. setPos/ATL/ASL seems to the only working for dead bodies.

Bottom Section