Hellrot   0 Posted March 5, 2019 Hello everyone!  Mission building for ArmA is something entirely new for me, and the fact I haven't played any games prior to III doesn't help... So I would appreciate if someone could help.  So far I've been searching for solutions throughout the Internet with slow but stead-ish results, but here's something I just can't find coherent answer for:  The level I have in mind is a helicopter mission (AH-99). Since I'm aiming for an experience easier than what ArmA III's bulky aircraft simulation offers, I need to buff it:  1. Ideally I would like the chopper to have a 0.88-0.90 damage threshold at all times, so it never explodes (even from hitting terrain), instead ending up disabled and crashing intact. Player and their gunner are invulnerable as long as they're inside the helo. If they disembark - they become vulnerable again. The helicopter takes 10% of the damage it normally would from enemy weaponry.  2. If the above isn't supported by the game's engine, I would like both the player and his gunner to survive the explosion and abandon the wreck to carry on on foot. And I have more or less achieved that for the AI gunner, but the player is stuck because apparently the "GetOut" action doesn't work once a vehicle is dead (set to "Locked" state?). There character you're controlling is alive, but he can't get out.  Here's what I entered in the pilot and gunner's Init.  Spoiler this addEventHandler ["HandleDamage", { _veh = _this select 0; if(vehicle _veh != _veh) then { if(_this select 5 < 0) then { damage _veh; } else { _veh getHitIndex (_this select 5); } } else { _this select 2; }; }];   Here is what's in the AH-99's Init:  Spoiler heli addEventHandler ["HandleDamage", {false}]; heli addEventHandler ["Hit", {heli setDamage (0.6 + getDammage heli)}]; dummy = this spawn { waitUntil {(damage _this) > 0.8}; { _x action ["GetOut", _this]; } forEach (crew _this); _this lock 2; }; heli setVehicleLock "UNLOCKED";   Any help would be appreciated. I know there are mods out there like "Survivable Crashes", but for my first mission I'd prefer minimum dependancies...  P.S. I have another question, it's not that important but it's proving to be embarassingly complex for me. What code and where do I put that makes USS Liberty's hangar doors to open or close once the player gets in range of a trigger? Share this post Link to post Share on other sites
Grumpy Old Man   3549 Posted March 6, 2019 To make all crew invincible upon boarding a vehicle: yourVehicle addEventHandler ["GetIn", { params ["_vehicle", "_role", "_unit", "_turret"]; _unit allowDamage false; }]; yourVehicle addEventHandler ["GetOut", { params ["_vehicle", "_role", "_unit", "_turret"]; _unit allowDamage true; }]; This will reduce damage by 90%, if total damage will be above 0.9 then the incoming damage is reduced to 0: //chopper receives only 10% of incoming damage and will get a damage of 0.9 at max yourVehicle addEventHandler ["HandleDamage", { params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; _return = _damage * 0.1; if (damage _unit + _return > 0.9) then {_return = 0}; _return }]; Note that for some reason the chopper will explode, no matter what, if the rotor is touching the ground.  Cheers  1 Share this post Link to post Share on other sites
Hellrot   0 Posted March 6, 2019 Hi, thanks for the help, it does what it says! 🙂 There's a problem though - when the chopper does end up blown up anyway, the AI can disembark and carry on on foot, but the player is locked up. You can't exit or do anything but exit/restart the mission. I assume the vehicle gets "Locked for player" when it's 100% damaged. Is there any way to "unlock" it so the player can get out? Bonus points if they get some damage themselves when doing so.  If not, killing the chopper's crew would work fine by me. Here's my (hilarious) attempt:  heli addEventHandler ["HandleDamage", { if (_damage heli >= 1) then ({setDamage 1} forEach units this})]; Needless to say, it doesn't work lol. Any ideas?  This is a completely new world for me and it can get quite confusing.. Share this post Link to post Share on other sites
Grumpy Old Man   3549 Posted March 6, 2019 Well you could kick out any units that were inside: heli addEventHandler ["Killed", { params ["_heli"]; {moveOut _x; _x allowDamage true} forEach crew _heli; }]; Cheers 1 Share this post Link to post Share on other sites