OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wildebeest on 10 Mar 2005, 12:09:15
-
Hi!
I'm having some problems with units not standing still. I have a group with guys that I have put "dostop this" and formation "none" on. The idea is that every soldier stays in his place, not moving. However, sometimes when the enemy attacks they tend to move... perhaps just to get a better shot. Now, is there a way of forcing them to never move what so ever? I've tried "Open fire", which I suppose means that they don't engage the enemy, but they keep moving. Before the enemy appears they are static though.
Thx guys
-
depends... if you want the units do remain rooted, use a loon_name disableAI "move" command. however, as you'd expect, they can no longer move, so if you want the units to go anywhere afterwards, you'll have problems.
the problem may be that they see the enemy and react. thus, you could use a dostop command, combined with loon_name disableAI "target" and/or loon_name disableAI "autotarget". that should stop them reacting to enemies around them, but perhaps not. everyone knows the loons in flashpoint have minds of their own... ::)
-
I think it was General Barron did a script to help with this. There are certainly some helpful Comments in the online comref under disableAI.
doStop only works until the enemy is spotted. "None" only keeps them out of formation until the mission starts: the group leader will call them into formation first thing.
Why do they need to keep still? What is the context?
-
They need to stay still because they are positioned in a sort of "foxholes" that I have made.
-
If you want your loons to stay in their foxholes (a good option for a loon in case of an emergency), the best way is to type:
this disableAI "MOVE"
Into the initline of any unit. If you also want to stop them from turning sideways and looking in new direction (a bad option for a loon hiding in a foxhole) you type:
this disableAI "MOVE"; this disableAI "AUTOTARGET"
In the initline. And if you want them to remain standing in their foxholes like the loons they are you can type:
this setUnitPos "UP"
-
Don't forget:
this disableAI "target"
Or you will be frustrated to no end, trying to figure out WHY your guys still move! See, it turns out that the AI can still move after you disable their "move" AI (weird huh?), but only during combat. Whenever the AI starts engaging the enemy, they will move to try and flank them, unless you disable their "target" AI. I don't know much about the "autotarget" ai, but I believe disabling this would prevent them from shooting at enemies without being forced to do so via the 'dofire' command.