Jump to content
Sign in to follow this  
Little Blue Assassin

Force a unit to stay prone

Recommended Posts

Okay, I am trying to make a soldier act as if his legs were shot (it's too bad I can't just script that). Actually, that's just part of what I am doing. I'm trying to make a completely disabled soldier. I put

this setunitpos "down"; this disableai "move"; this disableai "target"; this disableai "autotarget"; this setdammage 0.8; this setcaptive true

in the soldier's init field. However, he simply refuses to stay down. I searched in this forum under the keywords "force," "unit," and "prone." After wading through eight pages of topics, I have come to the conclusion that this particular question hasn't been asked before (which surprises me). Can someone please give me a workable solution?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (¤Specops¤ @ Feb. 06 2003,12:51)</td></tr><tr><td id="QUOTE">euh... this setUnitPos "down"

Is it correct ?<span id='postcolor'>

yes it is, and the code you are using should work...

try using this stop true at different points in the code...

Share this post


Link to post
Share on other sites

Okay, I'll do that. I did it before, and it seemed to work, but then I discovered the "disableai" commands and since the "this stop true" command was labeled obsolete by the command reference, so I replaced it with "disableai," thinking that it would remove the problem of the soldier constantly switching to rocket propelled grenade (I removed his gun but not his launcher) and therefore suddenly sitting up. Thank you for your input...

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Little Blue Assassin @ Feb. 06 2003,07:20)</td></tr><tr><td id="QUOTE">this setunitpos "down"; this disableai "move"; this disableai "target"; this disableai "autotarget"; this setdammage 0.8; this setcaptive true<span id='postcolor'>

It is working correctly. But, exept the last two comands, all others commands has no effect on player's soldier.

Share this post


Link to post
Share on other sites

What is working correctly?  If you mean that the soldier is now always prone, then it is not working for me.  Even when I put "this stop true" in, he stands up soon after he hears a certain explosion that occurs at the beginning of my mission.

[edit]It seems to work if the soldier is part of a group.  If he is alone, it doesn't.[/edit]

[edit]Never mind.  It doesn't work if he's part of a group, either.[/edit]

Share this post


Link to post
Share on other sites

If you want the soldier to act as if his legs are shot its probably better to just mess up his legs a bit.

this setpos [getpos this select 0,getpos this select 1,0.1];this setvelocity [0,0,-15]

That should do it.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Little Blue Assassin @ Feb. 07 2003,07:08)</td></tr><tr><td id="QUOTE">What is working correctly?  If you mean that the soldier is now always prone, then it is not working for me.  Even when I put "this stop true" in, he stands up soon after he hears a certain explosion that occurs at the beginning of my mission.

[edit]It seems to work if the soldier is part of a group.  If he is alone, it doesn't.[/edit]

[edit]Never mind.  It doesn't work if he's part of a group, either.[/edit]<span id='postcolor'>

Still it's working fine on my computer. I can even shoot near him and he is always prone not responding. Even simple

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setUnitPos "down"<span id='postcolor'>

makes him to be always prone.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Feb. 08 2003,17:53)</td></tr><tr><td id="QUOTE">[getpos this select 0,getpos this select 1,0.1]<span id='postcolor'>

Just what does "this select" mean? Also, how are coordinates measured? On the map, there are letters and numbers, but these are just numbers (I know that they are the x, y, and z coordinates, but beyond that I am completely ignorant). Please enlighten me.

Share this post


Link to post
Share on other sites

I washoping I'd find something here to help MY issue. I'd like units to STAY put sometimes. I've got an isertion and capture mission that is working quite well, however the assualt unit often strays from its waypoint and after they've captured their target, the target is wandering off all over the battle field until their extraction force arrives. Everyone does get on the truck however it's real annoying to see everyone going beserk and wandering the battle field...also it's dangerous. If they stay put..they;ll be safe. wink.gif

Hints?

I've also got a problem with choppers wandering from their waypoints even using lockwp.

The driving AI is pretty horrible too. Ever watch them drive around a city?

wink.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Rhino @ Feb. 08 2003,20:16)</td></tr><tr><td id="QUOTE">I've also got a problem with choppers wandering from their waypoints even using lockwp.<span id='postcolor'>

LockWP do not allow unit to go to another wp but it allow to target enemy and flee from dangerous zone. So put chopper into "careless" behaviour and it will stay near locked wp.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Little Blue Assassin @ Feb. 08 2003,08:03)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Feb. 08 2003,17:53)</td></tr><tr><td id="QUOTE">[getpos this select 0,getpos this select 1,0.1]<span id='postcolor'>

Just what does "this select" mean?  Also, how are coordinates measured?  On the map, there are letters and numbers, but these are just numbers (I know that they are the x, y, and z coordinates, but beyond that I am completely ignorant).  Please enlighten me.<span id='postcolor'>

-this in init line of unit means name of this unit.

So if you name some soldier bruno you can use even bruno and this in its init line.

-select # - it takes value at position # from some array.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

getpos this select 0<span id='postcolor'>

means : take first value (0 is first) from position array [x,y,z] of this unit.

-[x,y,z] coordinates. [0,0,0] is lower left corner of map at zero altitude. (but there is absolute [0-sea] and relative [0-ground] altitude - relative alt. is used usually)

Share this post


Link to post
Share on other sites

Thanks...

How about the x and y coordinates? How are they measured? On the map, the coordinates are letters and numbers, but here they are just numbers. Also, where is 0,0? Is it the center of the map, or is it the lower left corner?

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  

×