OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: mcnorth on 08 Apr 2007, 21:52:09

Title: Helicopter - stay on task
Post 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.
Title: Re: Helicopter - stay on task
Post by: h- on 08 Apr 2007, 22:35:29
Try setting the chopper's behaviour to "careless"
Title: Re: Helicopter - stay on task
Post by: satexas69 on 09 Apr 2007, 06:35:57
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.
Title: Re: Helicopter - stay on task
Post by: mcnorth on 09 Apr 2007, 22:59:21
Thanks guys. Unfortunately it's still a no go.
Title: Re: Helicopter - stay on task
Post by: Mr.Peanut on 10 Apr 2007, 17:19:44
Is the helicopter movement scripted or done with waypoints?
Title: Re: Helicopter - stay on task
Post by: mcnorth on 11 Apr 2007, 01:03:52
Is the helicopter movement scripted or done with waypoints?
It's scripted.
Title: Re: Helicopter - stay on task
Post by: Mr.Peanut on 11 Apr 2007, 01:57:05
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".
Title: Re: Helicopter - stay on task
Post by: mcnorth on 11 Apr 2007, 07:18:50
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.
Title: Re: Helicopter - stay on task
Post by: Mr.Peanut on 11 Apr 2007, 14:57:10
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?