Jump to content
Sign in to follow this  
Calli

I need help with attachTo command!

Recommended Posts

How do I make the troops ride on top of the apc like this?

ryssarpapc.jpg

I know that I should use attachTo commands, but I just don't know what to write.

Could anyone make a demo mission or something that shows how to script it?

And I want them to sit like those on the pic :D

Share this post


Link to post
Share on other sites

The trick is to a) determine a suitable position on the vehicle and b) set the animationstate of a unit accordingly.

BIS provides some animations for units sitting on vehicles.

Example (_unit = soldier, _vehicle = HMMWV):

--------------------------------------------

_unit attachTo [_vehicle,[-0.8,-1.5,-0.7]];

_unit switchMove "aav_cargo01";

_unit setDir _0;

Voila, the unit sits on the HMMWV. The exact positions are relative to the defined vehicle center - you need some trial and error to find the one you want. Then you need to try which animation fits each position. I usually only use 2 animations:

"aav_cargo01" and "miles_c0briefing_odpovedel_loop".

Hope that gets you going,

VictorFarbau

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  

×