Jump to content
Sign in to follow this  
Joona

Action sit down?

Recommended Posts

I have tried to get a soldier to sit down by writing to the

init: this action ["sit_down"] & ["SITDOWN"]
but they dont work. So how do I need to write it? And it didnt work when tried to put them salute. Edited by Joona

Share this post


Link to post
Share on other sites

How about getting a unit to sit on a chair? The sitDown action makes them sit on the ground, even if they're standing next to a chair.

Share this post


Link to post
Share on other sites

There is no action to sit on a chair, but it can be done with scripting by using the right animation and then attaching the soldier to the chair.

Share this post


Link to post
Share on other sites

Ok I have been looking around for answers for this, but everything I have found does not work or I don't understand how to do. So if you please, could some one give me step by step instructions on how to get a unit to sit via the editor so that even an infant could understand it. Thanks in advance = ).

Share this post


Link to post
Share on other sites

Give the unit a waypoint. In the On Act section for the waypoint enter:

this action ["sitDown",this]

Share this post


Link to post
Share on other sites

Nope still no luck, is that all i need to do? Is it also possible to do it without waypoints and not have to go out of the game and do scripts?

Share this post


Link to post
Share on other sites

The trick is to make the behaviour in the waypoint to "safe" or "careless."

Now, my question is how do I get the unit to sit down at the BEGINNING of the waypoint? Basically, I have a guy who I want to walk to a point and sit down, then after a designated amount of time, get up and walk away again. I've tried the timeout thing, but he just stands there for a time, sits down and gets back up really quickly, then goes about his merry way. I know i'm missing something easy...

Share this post


Link to post
Share on other sites
Now, my question is how do I get the unit to sit down at the BEGINNING of the waypoint? Basically, I have a guy who I want to walk to a point and sit down, then after a designated amount of time, get up and walk away again. I've tried the timeout thing, but he just stands there for a time, sits down and gets back up really quickly, then goes about his merry way. I know i'm missing something easy...

The "on act" only executes when the unit has completed the waypoint and is moving to the next, which is slightly annoying at times.

For a simple scenario like you describe, I would try putting another waypoint very close to the waypoint with the "sit down" script. You might need to increase its completion radius as well. Basically the idea is that the unit will complete its current waypoint, run the "on act" script to sit down, and then immediately find itself at the location of its next waypoint and therefore not need to move. If you make that next waypoint have a timeout, then hopefully it'll remain sitting until that timeout expires and it needs to move to the next waypoint - at which point it'll stand up again.

Clear as mud? I haven't tested this so I'm not sure it'll work, but it sounds good in theory. :)

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  

×