Would anyone know the easiest way of blowing up a helicopter, preferably using custom logic?
Basically I've got a scripted encounter where a helicopter patrols an area, and it's set up to loop around every now and then, and not "restart" if an emission is in progress. What I want to make happen is for an emission to "destroy" the helicopter, or at the very least make it so it's forced to "land" somewhere (going through the "on fire" animation) if it's already in the air.
The basic idea is to set up something in xr_effects so when an emission is in full swing it will "blow" up the helicopter. How would I go about creating a function to do this?
from bind_heli.script, possibly is even included in xr_effects already but I don't have the vanilla version to check.
function heli_start_flame( obj )
db.storage[obj:id()].flame_start_snd:play( obj )
function heli_die( obj )
local heli = obj:get_helicopter()
local st = db.storage[obj:id()]
db.del_heli( obj )
st.last_alt = heli:GetRealAltitude()
st.alt_check_time = time_global() + 1000