OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: p75 on 27 Jul 2009, 00:17:14

Title: Commanding your pilot to move, stay (not engage) and hover while playing as gunn
Post by: p75 on 27 Jul 2009, 00:17:14
Hi,

I'd like to be able to be play as gunner and direct my pilot to a certain spot on the map (without him engaging) and simply hover above the spot with the helicopter's nose pointed to the direction I want.

I can't figure out how to do this without the use of waypoints. I'd like to use
a script which allows me to order my pilot to a certain spot and simply hover.

For that matter I've tried team switching and as soon as I switch from the pilot to gunners seat the damn pilot either engages or lands

In that case: how do I prevent a pilot to land or engage without using waypoints?

Someone mentioned somthing about AI FSM behavior to me. But so far I'm completely in the dark. The script is for intended for my own Apache Ah-64 missions. Can someone please help me out?
Title: Re: Commanding your pilot to move, stay (not engage) and hover while playing as gunn
Post by: CrashDome on 29 Jul 2009, 04:54:34
I can't be 100% sure about this, but try to order the pilot into "Safe" mode and then order him to "Watch Direction".

I do not know if he'll start evading incoming fire, but I would assume he would - and thats a good thing.

Title: Re: Commanding your pilot to move, stay (not engage) and hover while playing as gunn
Post by: Worldeater on 29 Jul 2009, 05:04:38
Someone mentioned he used setCaptive (http://community.bistudio.com/wiki/setCaptive) to keep the pilot from engaging targets.
Title: Re: Commanding your pilot to move, stay (not engage) and hover while playing as gunn
Post by: p75 on 30 Jul 2009, 14:34:35
Thanks lads, appreciating the input, I'll give it a go.

I have one more question:

If I want my vehicle to always fly at a minimum of say 200 meters, can I write a string into the vehicle init block stating a certain minimum flying height? If possible, which command/function would I use?
Title: Re: Commanding your pilot to move, stay (not engage) and hover while playing as
Post by: nominesine on 30 Jul 2009, 15:17:21
this flyInHeight 200

It'll be the absolute height above ground. I.e minumum as well as the maximum height.
Title: Re: Commanding your pilot to move, stay (not engage) and hover while playing as
Post by: p75 on 31 Jul 2009, 14:02:26

I gave this a try, but as soon as I switch seats (from pilot to gunner - I'm auto-hovering at that time (don't know if that makes a difference?)) the helicopter decents and lands  :(

Is there any command which give your pilot to just stay on the spot at a certain height?


 
No need to quote the previous post which you are obviously replying to - Planck