Jump to content
Sign in to follow this  
-=Firewall=-

How to tell a heli pilot to stay at a position while attacking an enemy

Recommended Posts

Good evening,

I want to give the heli pilots some tactics to increase survivability.

First I want to write a script, so that the AH64 could hover behind some trees at a waypoint. Then it goes up, scans the area, and moves down again. After some seconds the heli goes up again and fires the hellfires. After that it moves down again. Insofar it works all right, but after the heli moved up the second time, the pilot engages(flying towards) the enemy instead of just going down again.

So here's my question: How could I avoid that the pilot flys towards the enemy? He should just go up and down, fireing the missles.

It doesn't matter what waypoint behaviour is set.

forceSpeed(0) also doesn't work.

Heres the simple code:

_heli flyInHeight 50;
_heli doMove[(getPos _heli select 0), (getPos _heli select 1), 50];
_heli forceSpeed(0);
~10
_heli flyInHeight 10;
_heli doMove[(getPos _heli select 0), (getPos _heli select 1), 10];
_heli forceSpeed(0);
~10

In the second step the heli will change its position after moving down again, but first I have to solve this problem.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×