Home   Help Search Login Register  

Author Topic: Spawn injured pilot at crash site  (Read 2334 times)

0 Members and 1 Guest are viewing this topic.

Offline stephen271276

  • Members
  • *
Spawn injured pilot at crash site
« on: 09 Oct 2009, 16:24:34 »
Hi again fellas.

Can any of you help me?
i have a mission where a US chopper flies over player controlled group towards town and gets shot down. Now Ive done all that bit fine but what I need is once the chopper crashes and explodes I want a pilot to be spawned as close to the crash site as possible without gettin injured by the explosions that follow after the chopper crash, and for him to be called jon and for him to be injured and need healing using the module by one of the player group. Is this possible? If so what would I put in the init line of  a trigger that is set to go off once the chopper in down?

Offline tcp

  • Members
  • *
    • Violator Gaming
Re: Spawn injured pilot at crash site
« Reply #1 on: 10 Oct 2009, 03:23:32 »
this allowDamage false;
in the unit init would prevent further damage to him.

There's a way to disable secondary explosions, but I forget what it is.

I would addeventhandler killed on the chopper and execute the script to create the pilot near the crash site.

Then setdamage to about 0.5 on the pilot and then change allowdamage.

To keep him invincible until he's healed;

while{damage _pilot > 0} do {sleep 15;}; //can use waitUntil but priority is different
_pilot allowDamage true;