Jump to content
Sign in to follow this  
dummy_01

How to make a soldier stand at ease with gun on his shoulder?

Recommended Posts

I am using the ArmA 2 editor and I want a soldier to start out standing carrying his gun on his shoulder.

To achieve this I put in his init field: this setBehaviour "safe";

...but it doesn't work. I also tried "careless".

I also tried using the Arma 1 animation where the soldier slings the gun on shoulder. That works, but only for 1 second. After playing the animation the soldier is back in his original stance with gun in hands. :(

Anyone knows how to make a soldier stand at ease or attention with gun on his shoulder?

Does setBehaviour not work in ArmA 2?

Share this post


Link to post
Share on other sites

There is no set of animations in ArmA 2 (or ArmA) for carrying slinged rifles. You can make them do it, but they won't be able to move like that.

Share this post


Link to post
Share on other sites

That's OK. They don't have to move like that (as they could in OFP...).

I just want them to stand there, in line, in front of their commander.

Is that possible?

Share this post


Link to post
Share on other sites

Thank you!

Putting this in the soldiers init field worked:

atEase = this spawn {_this disableAI "ANIM"; _this playMove "AmovPercMstpSnonWnonDnon_Ease"}

Share this post


Link to post
Share on other sites

Cool, I didn't know about that anim. Also I can never remember whether the W or the S comes first... :rolleyes:

Share this post


Link to post
Share on other sites

I want to bring the soldiers back to life when an enemy is detected.

For this I use a trigger with OPFOR detected by BLUEFOR as condition and as activation:

soldier_1 enableAI "ANIM" ;

This makes soldier_1 react to his surroundings again. Now, how to do this for the entire group?

soldier_1 and soldier_2 and ... soldier_n enableAI "ANIM"; I suppose, but I think it is possible to address the entire group. Anyone know how?

Yes, noob. Learning everyday. :)

Share this post


Link to post
Share on other sites

{_X enableAI "ANIM"} forEach (units group soldier_1)

Or alternatively, you can ditch the trigger entirely and implement this in the spawned code:

atEase = this spawn {_this setBehaviour "SAFE"; _this disableAI "ANIM"; _this playMove "AmovPercMstpSnonWnonDnon_Ease"; waitUntil{sleep 1; behaviour _this != "SAFE"}; _this enableAI "ANIM"};

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  

×