Hey Folks,
Got another one here for you. I am trying to simulate an engine failure for an AI Helicopter.
I set up a Black Hawk unit, Name: CHOPPER.
Then I setup a few WPs to get CHOPPER moving.
I then set up a trigger along the WP path.
Condition: West Present
Action: HINT "Engines out!"; CHOPPER ACTION ["Engine Off"]
I place a Player unit near the trigger to observe the mayhem. However when CHOPPER hits the trigger the Hint fires off but the helicopter keeps on flying. If I change the Player to be the pilot of CHOPPER, the engines fail right on queue.
This is to be part of an intro so the AI really needs to be the one piloting CHOPPER.
Alternatively, when I couldn't get the "Engine Off" action to work I figured I'd write a looping SETPOS script that decreases the altitude of CHOPPER in increasingly aggressive increments (to simulate the acceleration of gravity).
The Psudeo code looked like
For 90 loops: get the current position of CHOPPER. SETPOS CHOPPER to the current position of CHOPPER - .5 Meters.
For the next 90 loops: get the current position of CHOPPER. SETPOS CHOPPER to the current position of CHOPPER - 1.75 Meters.
For the last 200 loops: get the current position of CHOPPER. SETPOS CHOPPER to the current position of CHOPPER - 3.25 Meters.
Now, this works but it doesn't look very realistic. The Pilot fights the altitude change by adding power. And, The chopper hits the ground a few times before exploding. Also, I am trying to Sync the movements of the chopper with a voice layover and because the AI fights the descent, synchronizing the voice is proving very difficult.
Any tips or tricks that can be offered will be greatly appreciated.