OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Dagon on 23 Aug 2004, 11:11:47

Title: Making helicopters "brainless"
Post by: Dagon on 23 Aug 2004, 11:11:47
I'm having difficulty with a mission i'm trying to design for OFP.

The current plan is that a MG-equipped blackhawk will fly (slow and low) past the wall of an enemy base, and the player (inside) will fire on the infantry units below. Following this, the helicopter will gain a slight amount of altitude and then eject the player's squad to finish off the remaining forces. (Since I don't know anyway to have the soldiers rappel down from the helicopter, and it seems a little suicidal completely stop moving and plant it on the ground inside an enemy base.)

However, I've encountered this problem:

Whenever the helicopter pilot "sees" an enemy or is shot at, he immediately goes evasive and flies 3 kilometres out into the sea. This means that the player most definately can't shoot at the soldiers as he passes them, seeing as they're 3 kilometres away and all.

I've tried using DisableAI target/autotarget/move, but this does nothing. I've also tried setting combatmode "BLUE" or setting the waypoints to combat mode: SAFE, as well as fleeing off. However, the helicopter still flies away. Is there anyway I make the AI single-minded or brainless, so it simply goes to the waypoints as it's told?
Title: Re:Making helicopters "brainless"
Post by: macguba on 23 Aug 2004, 11:16:47
chopper1 setBehaviour "careless"

I think there are here are fastroping scripts in the Ed Depot.
Title: Re:Making helicopters "brainless"
Post by: Dagon on 23 Aug 2004, 11:20:35
hey, thanks, looks like that worked. "SAFE" and "CARELESS" sound like almost the same thing, heh.
Title: Re:Making helicopters "brainless"
Post by: General Barron on 23 Aug 2004, 11:59:04
Yeah, in "safe" mode, the unit will go out of safe mode when he sees an enemy. Careless means he will never go out of safe mode until told otherwise via waypoint. Very useful for certain things, such as this.

Check the ed depot, because there are some good helo rapel/fastrope scripts in there.
Title: Re:Making helicopters "brainless"
Post by: Dagon on 23 Aug 2004, 12:03:22
I tried using a rappel script, but none of them are completely satisfactory.... maybe I should make the heli "pass" over the base, ejecting the black ops from it at a higher height?

that way, I can have a radio command to bring the helicopter back after the area is clear. Sound alright, or kind of unrealistic?