Jump to content
Sign in to follow this  
Major Fubar

Two quick questions

Recommended Posts

I looked in the Mission Editing FAQ but couldn't find a satisfactory answer to these...

How do I make it so that a unit will not move from the position that I have placed it in the ditor (i.e. say I put a soldier in a building, and don't want him to run out of the building when he hears shooting). I have tried "this allowfleeing 0", but that doesn't seem to work.

Similarly, how do I set a unit to either stand, crouch or lie down and not move from that stance, even once the shooting starts.

TIA - Fubar

Share this post


Link to post
Share on other sites

question 1:

this setbehaviour "careless"

or

this disableai "move"

question 2:

i'm trying to remember...

Share this post


Link to post
Share on other sites

this DisableAI "MOVE" is the solution - a CARELESS unit isn't going to do much in the battle.

The other commands you want are:

this SetUnitPos "UP"

this SetUnitPos "DOWN"

There is no command to crouch. I think General Barron has done a cover script that allows some finer control.

If you're not using the BuildingPos command I'd advise you search on that on OFPEC as well...

Share this post


Link to post
Share on other sites

init = this setbehaviour ""combat"";this setunitpos ""up"";this switchmove ""crouch""";

from BAS mission close to home ....make em crouch behind a wall

Share this post


Link to post
Share on other sites

Note : when you will need it

Quote[/b] ]this SetUnitPos "AUTO"

will give back the ability for the AI to select itself its stance.

Share this post


Link to post
Share on other sites

another possibility could be the following:

unit stop true

then the unit also still reacts to enemy contact

Share this post


Link to post
Share on other sites

Thanks all, I've tried combinations of these in the editor and they work a treat! biggrin_o.gif

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  

×