Jump to content
Sign in to follow this  
dutchkillar

how do i make a unit sit down? is there a list of,

Recommended Posts

some questions

is there a big list with all the scripts/commands?

how do i make some1 sit?

is it setunitpos "sit"... (or something)

how do i make a unit with weapons??

i wanna make a sniper mission where i have to kill a person walking down the street (or sitting, if thats possible!wink_o.gif

thx, dutchkillar

Share this post


Link to post
Share on other sites

There are 2 ways to do this:

1.

Via the action command, let's say the unitname is bob

Put this in bob's initialisation field, script or trigger:

Quote[/b] ]bob setbehaviour "safe";bob action ["SITDOWN",bob]

2.

Via the playmove or switchmove command

Put this in bob's initialisation field,script or trigger:

Quote[/b] ]bob setbehaviour "safe";bob switchmove "amovpsitmstpslowwrfldnon"

Also, there's a command to return a unit's animationname

Create a repeatable Radio trigger, condition this, on activation:

Quote[/b] ]hint format ["%1", animationstate player]

Preview your mission, perform the animation yourself (in your case, sit down) and activate the radiotrigger. The animationname will be hinted.

I have made an animation list for myself in excel, similar to the one on the wiki but with more descriptions and organised in 3 workssheets: stand,crouch and prone

Mine has no death, cargo or other fancy animations tho.

You can download that list here: http://www.mediafire.com/upload_complete.php?id=iwaizatqzww

Share this post


Link to post
Share on other sites

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

Or:

For unarmed persons:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit1 setBehaviour "SAFE"; unit1 playMove "AmovPsitMstpSnonWnonDnon"

For armed persons:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit1 setBehaviour "SAFE"; unit1 playMove "AmovPsitMstpSnonWrflDnon"

Share this post


Link to post
Share on other sites

thank u guys so much!

a noob question; whats playmove or switchmove???

offtopic: can u also get a automatic message when some1 replies ur topic?

thx

Share this post


Link to post
Share on other sites

PlayMove and switchMove are commands that change a unit's animation. SwitchMove forces the animation on the unit instantly with no transitional animations (in otherwords they warp into the first frame of the anim). PlayMove will first go through all the necessary anims inbetween the unit's current animation and the played animation, so it has a nice transition and looks better. PlayMove only works however if the anim in question can be transitioned to from the unit's current anim state (some animations are not connected to the main set of moves so switchMove must be used for them).

Share this post


Link to post
Share on other sites

Got an error on that page. Both IE and Firefox.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">The identifier you are using is invalid. This could be a Javascript problem with your computer, ensure you are allowing javascript to run fully for the Mediafire.com domain. If this problem persists please contact support directly.

Share this post


Link to post
Share on other sites

Just wanted to implement such and ran into a problem.

I have made this script to teleport some units to a campfire and have them sit there.

Problem is that they all get up again and do not remain on the ground.

What´s the deal ? huh.gif

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

trugu_1 setcombatmode "Green";

sitter setcombatmode "Green";

trugu setpos [getPos si1 select 0, getpos si1 select 1, 0];

trugu_1 setpos [getPos si2 select 0, getpos si2 select 1, 0];

sitter setpos [getPos si3 select 0, getpos si3 select 1, 0];

~ 2

trugu dowatch firecamp;

trugu_1 dowatch firecamp;

sitter dowatch firecamp;

~ 1

trugu disableAi "autotarget";

trugu_1 disableAi "autotarget";

sitter disableAi "autotarget";

~ 1

trugu action ["SITDOWN",trugu];

trugu_1 action ["SITDOWN",trugu_1];

sitter action ["SITDOWN",sitter];

~ 1

trugu disableAI "move";

trugu_1 disableAI "move";

sitter disableAI "move";

exit

Any input is welcome.

Share this post


Link to post
Share on other sites

i have the same problem.

i wanted to use some anims in some of my missions and i gave up using them because the anim finished and wouldnt remain. (Sitdown)

Share this post


Link to post
Share on other sites

AI must be in behavour "SAFE" in order to remain seated of course (just like in OFP). If you want to force him to stay down no matter what (like if they're fired upon or something) you could disable them from changing anims with disableAI "ANIM".

Share this post


Link to post
Share on other sites

Pretty new to scripting/mission making and i want to know more about using animations.

I can get a soldier to perform an animation but what method can i use for 1 soldier to perform multiple animations one after another like a sequence of animations? ...and how can i set timings between animations or loop the same animation?confused_o.gif

Thanks and sorry if i am hijacking here

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  

×