Jump to content
Sign in to follow this  
gummybear_qc

Moves and attachTo, help needed

Recommended Posts

Hello so I got 2 queries,

The first one is to make a move infinite. Like example, at the moment im using this move "cooper_c0briefing" wich makes the guy sit, but after maybe a minute or so, he stands up, wich I don't want.

The second thingy is that using this code "this attachTo [chair1,[0,0,-0.5]];" (no quotes) and at the same time using the sitting on chair emotes (cooper_c0briefing) makes it all perfect, except that he sits in the opposite direction while on the chair.

---------- Post added at 07:02 ---------- Previous post was at 05:47 ----------

Oh and by infinite i mean like, loop.

Share this post


Link to post
Share on other sites

If you want a unit to sit and not stand up make sure he is in safe mode. If you doing it with a specific anim:

_unit disableai "anim";

(use this after you've got him to sit down. It will stop him from changing anims but its like pausing him totally.

Some animations are looped while others are not. If this anim isn't looped automatically he will stand up unless you disableai anim.

Once you have him sitting down use:

_unit setdir 180;

to make him face the opposite direction.

Share this post


Link to post
Share on other sites
while {true} do
{
  _unit switchMove "cooper_c0briefing";
  waitUntil {animationState _unit != "cooper_c0briefing"};
};

Share this post


Link to post
Share on other sites

Don't forget:

while {true} do
{
  _unit switchMove "cooper_c0briefing";
  waitUntil {animationState _unit != "cooper_c0briefing"};
  _unit setdir 180;
};  

This could work but there may be some jerkiness in the switchmove transition.

Share this post


Link to post
Share on other sites
If you want a unit to sit and not stand up make sure he is in safe mode. If you doing it with a specific anim:

_unit disableai "anim";

(use this after you've got him to sit down. It will stop him from changing anims but its like pausing him totally.

Some animations are looped while others are not. If this anim isn't looped automatically he will stand up unless you disableai anim.

Once you have him sitting down use:

_unit setdir 180;

to make him face the opposite direction.

Ok but where do I add those codes? In units init line?

Share this post


Link to post
Share on other sites

You can put it in the init but make sure you put your switchmove line first then the setdir line and then the disableanim line.

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  

×