Jump to content
Sign in to follow this  
Darkguerilla

Gettin Unit To Sit

Recommended Posts

So far the only thing I've been able to figure out in getting a unit to sit is:

per1 disableAI "MOVE"; removeAllWeapons this; per1 switchMove "sitUnarm_L_relaxing";per setPos (getPos chair0); per1 setDir (getDir chair0 - 90);

However this only works with regular chairs and doesn't work with benches.

http://img651.imageshack.us/img651/7105/movej.png

I want to know how to drop him down onto the bench (blue) and how to move him left or right (orange or green). This would allow for making a rather nice scene with units sitting next to each other. However women apparently don't like to sit.

Share this post


Link to post
Share on other sites

you could replace

per setPos (getPos chair0);

with something like

per setpos (chair0 modelToWorld [0,0,0]);

and try a few different values, e.g. [0,0,-0.5] or [0,1,-0.5] etc.

modelToWorld

Share this post


Link to post
Share on other sites

Well it allows me to move him left and right, but not up and down and it only seems to work if I'm alright with having north facing people only.

Share this post


Link to post
Share on other sites

it should be x,y,z - so no change on different z values?

Share this post


Link to post
Share on other sites

chair0 enablesimulation false

per1 disableai "move";

 Per1 SWITCHMOVE "sitUnarm_L_relaxing"; chair0 setpos (per1 modelToWorld [0,0,0]); Per1 setdir 180;

Direction depends on what direction you have the guy and the chair facing obviously. In my example the guy is facing East.

With that particular animation he will act as if he is leaning on something and soon gets off the seat, so you can do

per1 disableai "anim"; 

to stop him getting up if you want.

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  

×