OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: beefholishness on 04 Jan 2006, 21:59:02

Title: Making em stand still?
Post by: beefholishness on 04 Jan 2006, 21:59:02
Just got back into OFP, thanks to ver 1.2 of the Civil War mod. (argh there goes college)

Quite simply, I need guys to stay put where I place them-they will do this if they are not placed in groups and are not given a waypoint-basically, one single guy standing in his own group wont go anywhere under any circumstances.  Well, this is what I need except with a full group.  I've tried every in-editor trick I can think of, is there a way to get their feet planted?
Title: Re:Making em stand still?
Post by: dmakatra on 04 Jan 2006, 22:02:33
Put this in their init field:

this stop true

Might be doStop, note sure though.

You could also use this disableAI "move", or something like that. Look it up in the ComRef.
Title: Re:Making em stand still?
Post by: The-Architect on 04 Jan 2006, 22:19:38
I have a couple of suggestions.

1. Set all of their formations to none in the unit box.
I've had trouble with this however and it won't stop them moving if their commander decides he wants them to move under withering fire. I guess you want him to stay put in such conditions so I'll go to idea 2.

2. Us the,

This DisableAI "Move"

command.
You could put it in all of their init lines or if you kbnow about groups you can put the following in the commander's init.

"_x DisableAI "Move"" ForEach Units GroupName

Check Syntax.

With DisableAI Move, the units will be unable to go anywhere. This is true even if you want them to later on. To get over it you can have a savegame which will allow them to move again. Note that savegame will disable the disable.
Title: Re:Making em stand still?
Post by: Pilot on 04 Jan 2006, 23:06:29
I believe you will also need a disableAI "Target" command.

Quote
get over it you can have a savegame which will allow them to move again. Note that savegame will disable the disable.
I don't believe the savegame itself enables the AI.  I believe when the player re-loads the mission, the AI is enabled, but the savegame command itself doesn't do it.

-Pilot
Title: Re:Making em stand still?
Post by: The-Architect on 04 Jan 2006, 23:11:25
It does.

See Demo Mission.
Title: Re:Making em stand still?
Post by: beefholishness on 04 Jan 2006, 23:16:49
Thanks alot guys, the init line did the trick.  I'm only messing around with a few short skirmishes right now, so making them move later on is not a big deal.
Title: Re:Making em stand still?
Post by: XCess on 05 Jan 2006, 01:29:04
*ahem* solved?
Title: Re:Making em stand still?
Post by: Pilot on 05 Jan 2006, 01:30:13
Quote
It does.

See Demo Mission.
Well, I'll be...  I didn't know that.  Thanks for that. :)

-Pilot
Title: Re:Making em stand still?
Post by: beefholishness on 07 Jan 2006, 01:02:26
*ahem* solved?
What, my question?  If you were refering to me, see post above yours ;)
Title: Re:Making em stand still?
Post by: Planck on 07 Jan 2006, 01:08:44
I think it was a 'hint' for you to press the 'solve' button.


Planck
Title: Re:Making em stand still?
Post by: beefholishness on 08 Jan 2006, 07:15:44
I think it was a 'hint' for you to press the 'solve' button.
I've never seen one of those... didn't notice it. Thanks for the heads up ;)