Jump to content
Sign in to follow this  
Steaksauce1337

Weapon on back, slung arms.

Recommended Posts

Anyone know the command or syntax to make a unit walk with his weapon on his back as if he were marching.

SoldierOne action ["WEAPONONBACK", SoldierTwo]

tried this as a trigger and does not work.

Share this post


Link to post
Share on other sites

Apparently there is no simple command to do it, because the AI will always try to draw his weapon for some reason. You might have to try a looping script

Share this post


Link to post
Share on other sites

There is a set of animations for doing that; this one walks forward with weapons on back:

dude playMove "AmovPercMwlkSnonWnonDf";

It works for about 3 secs at a time (approximately). I don't know what your goal is, but if you just want some AI to walk around like that in a scripted way, I suppose you could loop the animation.

Share this post


Link to post
Share on other sites

Try this (untested)..

while {alive dude} do
{
    dude playMove "AmovPercMwlkSnonWnonDf";
    sleep 3;
};

EDIT: You will need to write an sqf for it as code with sleep won't work from the init line of a trigger. Call your sqf something like "marching.sqf" and call from a trigger: nul = [] execVM "marching.sqf";

Edited by Das Attorney

Share this post


Link to post
Share on other sites

nice it works perfectly.. now how do i get the guy to walk a path? like.. do an about face and walk back?

i pretty much just want the guy to walk back and forth like a sentry

(thanks for the help too!!!)

Share this post


Link to post
Share on other sites

I really don't know. Can't use waypoints with this animation, and I haven't found an animation that reverses direction. Doesn't mean it's not out there. I always use Clayman's animation viewer to check these out: http://clayman.kilu.de/Games/ArmAII/CLAY_AnimationViewerOA_V13b.rar

Could use an unarmed soldier with a move waypoint and a cycle waypoint to simulate a sentry, but you obviously want to see the rifle on the back. And Arma AI loves to hold its guns :shoot:

Share this post


Link to post
Share on other sites

Yeah that IS pretty weird. I remember in OFP I could set behavior to safe and they would sling arms.

Wasnt really that important but figured it would look good at a gate or something having a guard with arms slung giving a salute to people who come and go. Just for eye candy really. I guess "safe" now is when the gun is at the low ready.

Share this post


Link to post
Share on other sites

you could keep the looping animation script. and add this somewhere along the lines:

vehicleName setVelocity [x, z, y]

to make it move,

and maybe:

for "_i" 0 to 179 do {

unit setdir _i;

sleep 0.5;

};

dont assume the syntax is correct here, its just some quick pseudo code that might do the trick for rotating the unit and moving them with the animation in tact.

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  

×