Jump to content

Sign in to follow this  
jimbojones

Make soldiers sit down and stay down?

Recommended Posts

Hello. I am trying to make 3 soldiers sit down around a fire, and face the proper direction. Can anyone help me get the soldiers to sit and stay seated int he right direction? I tried searching around but I have had no luck....I have found bits and pieces but I am too new to put it all together. Thanks in advance

Share this post


Link to post
Share on other sites

I continued my search and found some info on OFPEC

group_name setformdir value

unit_name switchmove "EffectStandSitDownStill"

and i believe i can just add this into the waypoint to have them sit when they reach it

Share this post


Link to post
Share on other sites

in order to make a unit sit forever u need to use the playmove command. also units will only perform these actions using a .sqs script. What you need to do is find the action name u want(there not the same as ofp) i found them on this forum so check each thread relating to actions. Open the sqs and type.

"unitname" setbehaviour safe

"unitname" playmove "movenameuwouldliketoplay"

To create a sqs file use wordpad then save it as "name".sqs (remove the .txt) Save it to the usermissions directory.

then to get him to play move type in his initialisation;

exec "Nameofsqs.sqs"

Its easy once u learn how but u need to get the action list

Share this post


Link to post
Share on other sites

You can just make a waypoint or a trigger. Just type on the "on activation" field:

unitname playmove "movPsitMstpSlowWrflDnon" (for example)

Unit needs to be in safe or careless mode in order to stay seated.

Description of some moves is buried here.

You don´t have to do any sqs or sqf script files.

Share this post


Link to post
Share on other sites

still not working .. i tried everything..

we plays the move and then just puts his hands next to him ..

he is in safe mode...

Share this post


Link to post
Share on other sites

Sorry, but I don't understand what you mean.

Do you mean, that he stands up again ?

Share this post


Link to post
Share on other sites

well yeah . after animation is done he stands up again and he

puts his hands next to his body . i tried it with other animations to .. same result

Share this post


Link to post
Share on other sites

FOUND IT ..

ok i found solution.. i did the soldier1 setbehaviour "safe" thing in his init line.. when i add it to the trigger where the animation is executed it all goes well.. tx for the replies

Share this post


Link to post
Share on other sites

Maybe it can help: dirty script to have some soldiers sit and watch a fire ... sorry for poor code quality.

create a file "sit.sqf":

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0;

_fireplace = _this select 1;

_unit doWatch _fireplace;

_unit setBehaviour "careless";

sleep(1);

_unit playmove "AmovPsitMstpSlowWrflDnon_Smoking";

_unit disableAI "move";

Create a number of soldiers named soldierXX (XX is any number). Put on map a fire object named "fire";

create a MOVE waypoint for each soldier and put it nearby the fire. Place into each activation field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

foo = [soldierXX, fire] execVM "sit.sqf";

Share this post


Link to post
Share on other sites

I've done this too without using any scripts:

Just put in Trigger (or add this to existing one) and into "On activation" field type:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">UnitName doWatch Object

It's not so universal, but it works wink_o.gif .

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  

×