Jump to content
Sign in to follow this  
aook002

Sitting on an object

Recommended Posts

I was just wondering if it was possible to make a unit sit down on a chair or something as you can make units sitdown on the floor using code.

I know how use the action command to make them sit down on the floor using the command:

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

Its just that i'm making  a mission and wanting to show like a commander giving a briefing to soldiers  smile_o.gif

Aook

Share this post


Link to post
Share on other sites

for this you will need to use a trigger.

on activation: man1 setbehaviour "careless"

man1 switchmove "onchair"

Share this post


Link to post
Share on other sites

Ok, i get it now.

But i have a problem  sad_o.gif

The man goes into the 'sitting' position but how do I get him to sit on the chair exactly? Because he always seems to be not on the chair properly.

My man is floating above the chair!!! Help ME!!!  crazy_o.gif

Aook

Share this post


Link to post
Share on other sites

Try this use a chair x in the empty objects.

make a west unit and call him a

make a trigger activated by west

in the on activation put this

a switchmove "Fxstandunivtable"

move the unit or the chair a few times till u get it perfect

repeat the stuff above if you want more soldiers sitting, but just change name of next unit to b,c, and so on

Share this post


Link to post
Share on other sites

also what is that command to make the units height lower or higher

This setpos something .....

Share this post


Link to post
Share on other sites

How do I place a unit on a certain height?

Put into init.field:

Code Sample

this setpos [(getpos this select 0), (getpos this select 1), 4]

change 4 above to whatever height smile_o.gif

Share this post


Link to post
Share on other sites

Another technique for setting a unit's height is this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit setpos [getpos this select 0, getpos this select 1, (getpos this select 2) + x]

Where x is the number of meters that you want the unit to be lifted.

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  

×