Jump to content

Recommended Posts

Posted

Not sure if this is the right place for this question but I am curious to know if it is possible to have an AI helicopter as it is flying, have the engine shut down or render the flight controls useless so it crashes.

 

I have created a mission where a Blackhawk has dropped off troops but as it is leaving the area, I want it to shut down or take a direct hit from an RPG or similar but not have the unit explode in midair with the explode unit trigger. On it's voyage down to the hard deck, I have a sound file set up to send a mayday. I don't care if the unit survives the impact or not but I dont' want it to explode completely in midair.

 

Example would be like in the movie courage under fire, uh-1 takes heavy fire and mayday is sent out as the chopper is going down. That's the sound file I intend to use with Matt Damon screaming into the radio

Posted

Best choice would be to use the scripting engine and create an explosion based on the position of the helicopter and offset the explosion slightly.

 

Put something like this into a "Do Script" trigger action. You may need to alter the "power" (the number) of the explosion or change the position as needed.

 


local pos = Unit.getByName('myUnit'):getPosition().p
pos.x = pos.x + 20
pos.y = pos.y + 3
pos.z = pos.z + 20
trigger.action.explosion(pos, 200) 

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted (edited)

Thanks Grimes, I'll have a play around with that and post back my findings.

 

EDIT: 91 is perfect for anyone else who attempts this with Grimes's script. Chopper loses a blade and circles pouring out smoke and still manages to land intact.

Edited by Winfield_Gold
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...