Ronnie P 10 Posted September 10, 2013 Goodday gents, Just a very quick question...if I place a Loach helo on the ground, and reduce it's health to 0 so it look like it's crashed, is there a way to make my co-pilot a casualty? I want to make a mission where a small recon-helo goes down and one of the pilots has to make an exfil out of the area, avoiding patrols and such, at night. Thanks, Ronnie. Share this post Link to post Share on other sites
YattaYatta 10 Posted September 10, 2013 I would suggest starting the game in the heli - more dramatic ! Afaik if you place an helicopter as a player, a copilot is automatically added to the heli. Now do the following : - In the helicopter initialization write this : null = this execVM "helicoStart.sqf"; - Set the copter "special" parameter to "Flying" - Create the "helicoStart.sqf" file in your mission folder, and put the following script : _this setDamage 0.8; // this damages the copter, should make it unable to fly player allowDamage false; // the player is on godmode so he wont die when the heli crashes - but the copilot will. sleep 10; // sleep 10 seconds to let the heli crash player allowDamage true; // makes the player vulnerable again its untested but its pretty simple, should work. Share this post Link to post Share on other sites
jts_2009 96 Posted September 10, 2013 player allowDamage false; This protects you only against bullets. You are not in god mode -_- Share this post Link to post Share on other sites
YattaYatta 10 Posted September 10, 2013 This protects you only against bullets. You are not in god mode -_- According to the official wiki, allowDamage allows or prevent an object being damaged (or injured, or killed). Using "player allowDamage false;" will definitely allow you to survive to a crash. Tested and confirmed. You might want to check your sources. Share this post Link to post Share on other sites
Larrow 2820 Posted September 10, 2013 The problem with allow damage is that it DOES protect from all damage BUT if the inflicted damage is large and quick it sometimes fails to catch the damage before you are dead. If you need to protect from all damage without the chance of a fail use the eventHandle "HandleDamage". Share this post Link to post Share on other sites
austin_medic 109 Posted September 10, 2013 The problem with allow damage is that it DOES protect from all damage BUT if the inflicted damage is large and quick it sometimes fails to catch the damage before you are dead.If you need to protect from all damage without the chance of a fail use the eventHandle "HandleDamage". :/ the guy is new to scripting. urunitnamehere addeventhandler ["HandleDamage",{urunithere setdamage 0; }]; should work (Not tested). Share this post Link to post Share on other sites
Larrow 2820 Posted September 11, 2013 :/ the guy is new to scripting. Thats exactly why i didnt go into the mechanics of eventHandlers, there was already a decent answer posted that may well do what is required. If Ronnie P found out that the enableDamage was not doing what was needed/expected, one: my answer gave them the knowledge to know why and two: gave them an alternative to either look up or ask for further help on. Share this post Link to post Share on other sites
kylania 568 Posted September 11, 2013 urunitnamehere addeventhandler ["HandleDamage",{urunithere setdamage 0; }]; unit addeventhandler ["HandleDamage",{}]; That's all you should need really. But you need to add it after the game start so you override the silly built in HandleDamage event handlers I believe. There's a feedback thread about that somewhere. Share this post Link to post Share on other sites
Ronnie P 10 Posted September 12, 2013 Ehrm..thanks guys, I now realise there is somewhat of a steap learning curve ahead..:) Share this post Link to post Share on other sites
Von Quest 1163 Posted September 13, 2013 1. Set Heli up high within Elevation Box: 500m 2. Set fuel to 0 3. Place Heli Crewman near where Heli will fall from sky 4. In Unit's Init Box to remove his helmet with: removeHeadgear this; (optional) 5. Sprinkle OPFOR around crashsite X meters away with Waypoints leading them into the area. Set the Type/Movement/Behavior how you prefer. 6. ESCAPE the vile enemy Search Team! Share this post Link to post Share on other sites