OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: mcnorth on 08 Apr 2007, 21:52:09
-
Has anybody found a way to keep a helicopter on it's assigned task when it knows about enemy units? To be more specific I'm working on a helicopter extraction that works flawlessly except when the helicopter sees enemy units. Then it deviates from it's course and won't land. I've tried "disAbleAI", "allowFleeing", "setCaptive" (last resort) and "setSkill".
Any new ideas are appreciated.
-
Try setting the chopper's behaviour to "careless"
-
And if other choppers or flying stuff is in the area, change the "setheight" to a "probably not used" safe level value... I had to do that on a mission with timed flying through traffic.
-
Thanks guys. Unfortunately it's still a no go.
-
Is the helicopter movement scripted or done with waypoints?
-
Is the helicopter movement scripted or done with waypoints?
It's scripted.
-
Setting behaviour to careless should work. You might have to repeatedly send the helicopter a move command. Try checking out Mandoble's helicopter suite in the OFP forum under Scripts Beta testing here (http://www.ofpec.com/forum/index.php?topic=27360.0).
edit: oops. what should work is setBehaviour "CARELESS" and setCombatMode "BLUE".
-
Thanks Mr Peanut. That looks promising so I saved a copy to delve into when I can commit more time to comprehending it.
Where 'setBehaviour" is concerned I've tried both "careless" and "safe". I've also tried setCombatMode "Blue", taking away ammo, taking away gunners and just everything else I could think of. But I hadn't thought of constantly re-sending the move command.
-
Just to make sure, I meant you had to set both the behaviour and set the combat mode.
Not that I know anything about FSM, but might this have something to do with problems of overriding the default FSM (http://community.bistudio.com/wiki/FSM)?
edit: Are you using the moveTo command?