Jump to content
Sign in to follow this  
Rafalski

How to make unit get in turret with animation, (orderGetIn true;)

Recommended Posts

I would like to have effect that works as this hypothetical code below:

_unitOne assignAsTurret [[1],vehicleName]; 
[_unitOne] orderGetIn true;

units runs into the MH60 and gets into second gunner (with animation).

(I know moveInTurret but it moves the soldier into the vehicle's turret. (Immediately, without animation).

Share this post


Link to post
Share on other sites

Try this:

while {_unitOne distance vehicleName > 2 && alive _unitOne && (damage vehicleName) <= 0.9} do
{
_unitOne doMove position vehicleName;
sleep 3;
};

if (!alive _unitOne) exitWith {player sideChat "Oh no! _unitOne is down"};
if ((damage vehicleName) > 0.9) exitWith {_unitOne sideChat "Err, the vehicle is toast"};

_unitOne assignAsTurret [[1],vehicleName]; 
[_unitOne] orderGetIn true;

EDIT: This does not work for units under player control. orderGetIn only works for AI led units.

Edited by Das Attorney

Share this post


Link to post
Share on other sites

a) Tell them to board at a different position and moveInTurret once he is inside.

b) Use doMove and if he is close enough, play the anim yourself and use moveInTurret.

Share this post


Link to post
Share on other sites

in many cases will work, assignAsCargo, let them get in, unasign and moveInTurret.

But there is a problem:

If there is as many units to board vehicles as positions in the vehicle (driver+gunners(turrets)+commander+cargo).

If cargo capacity is 4 I can not assignAsCargo 5 units.

(I would have to wait when one of the cargo unit be in turret to assign the last one) Looks very complicated, much easer will be assign to turret and use ordergetin

if assignedVehicleRole can return ["turret",path] so must be the way to assign to turret.

I hope there is a way? as I do not see any movement here...

PS. Does anyone knows how the assignAs... command works, maybe it set up some variables to the unit or vehicle, so we can find out the workaround.

Edited by Rafalski

Share this post


Link to post
Share on other sites
Try this:

_unitOne assignAsTurret [[1],vehicleName]; 

Ehh, what is assignAsTurret? No reference on the wiki and my game chokes on it (in init field). Did I miss something?

Edit: Lol, oh. Hypotetical command. Whupsie :D

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×