Jump to content
Sign in to follow this  
Ronnie P

Beginner reporting in..

Recommended Posts

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

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
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
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

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
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
:/ 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
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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×