OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: j-man on 22 Jan 2004, 02:26:58
-
Is it possible to make soldiers run as fast as possible, ignoring all gun fire, enemies, etc... until they reach a trigger ???
Thanks in advance
-
Try using setbahaviour careless and speed mode fast.
-
Thats what I first thought of, but its just going to make him sling his gun and thus walk slower.
The only way I can think of it is by using some trickery of disabling his AI and scripting him to run from point A to point B. You might have to use a dummy for this death run as you wont be able to turn his AI back on.
You could use a combination of
soldiername disableAI "Move"
and
soldiername disableAI "target"
and see if he runs properly.
-
You have a good point [icarus_uk], but wouldn't: Unit DisableAI "Move" just stop him from moving at all?
Try:
Unit DisableAI "AutoTarget" or just Target like Icarus said.
!Be warned that any unit you use DisableAI on can never be reversed!
Also put: This SetUnitPos "Up", and maybe: This AllowFle(e)ing 0, and This SetSpeedMode "Full" in their init. fields.
Beware the GrimMonkey
-
*shakes head in self-annoyance, listens to shit slopping about inside*
-
As I understand it, disabling a units AI doesnt stop them from being able to do something, it just stops them from doing something on their own.
You can still tell a unit to move even though his move AI is disabled, he just wont move on his own, ie around obstacles and away from tanks etc.
-
Point your guy in the right direction and try running this along with GrimMonkey's suggestions. You will have to work out the timing and when you want them to stop:
Soldier1 SetUnitPos "Up"
Soldier1 AllowFleeing 0
#Loop
Soldier1 PlayMove "CombatSprintF"
~2
goto "Loop"
-
Or you could also try using the combatMode.
hold fire
or
never fire
should do it (can't remember which one).
scripted that would look like:
unit setCombatMode "BLUE"
for NEVER FIRE
or
unit setCombatMode "GREEN"
for HOLD FIRE
~S~ CD
-
If i'm not completely wrong, the disableAI "move" command just disables a unit to do some on their own, as keeping formation or following the leader...you should still able to use the move command to make him run.....a script for this topic could look like this :
unit setbehaviour "AWARE"
unit setcombatmode "BLUE"
unit DisableAI "Move"
unit DisableAI "Autotarget"
unit domove getmarkerpos "markername"
this is not tested and i would be happy when the scripting guru's in here could take a look on it if this could work.
-
Well, setting their speedmode to full and their combat mode to blue sorta does the trick, but they still stop every once in awhile even though their not targeting anyone :( . Anyway, thanks for all the help, I could probably get it working now.