Home   Help Search Login Register  

Author Topic: Immortal plane  (Read 1004 times)

0 Members and 3 Guests are viewing this topic.

Offline nimierkki

  • Members
  • *
Immortal plane
« on: 24 Jun 2006, 14:43:51 »
Do anyone know how to do Immortal plane?? thx sorry my english

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Immortal plane
« Reply #1 on: 24 Jun 2006, 15:02:01 »
You may try to write the following into the plane's INIT field:
Code: [Select]
this addeventhandler ["Hit",{(_this select 0) setdammage 0;driver (_this select 0) setdammage 0;gunner (_this select 0) setdammage 0}]

Offline nimierkki

  • Members
  • *
Re: Immortal plane
« Reply #2 on: 24 Jun 2006, 15:08:36 »
how i make the passinger immortal at the plane too??
in the goud they can die

ilke inthe plane tay cant die but when they jumped off they can die
« Last Edit: 24 Jun 2006, 15:19:24 by nimierkki »

Offline SniperAndy

  • Members
  • *
    • VBS Community
Re: Immortal plane
« Reply #3 on: 25 Jun 2006, 12:41:24 »
Code: [Select]
setdammage 0;cargoI think...

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Immortal plane
« Reply #4 on: 25 Jun 2006, 13:52:40 »
Quote
setdammage 0;cargo

I think...
Not exactly...
Code: [Select]
"_x setDamage 0" forEach (cargo nameoftheplane)OFP sqs code is not exactly OOP :P


But to answer the immortal passengers thing, you would need to add that same eventHandler for them as you add for the plane..
So try putting the following in the plane's init field:

this addEventHandler ["hit",{(_this select 0) setdammage 0; {_x setDamage 0} forEach (crew (_this select 0) )}]; {_x addEventHandler ["hit",{ (_this select 0) setDamage 0}]} forEach (crew this)

(sorry, no code tags because they screw up that line for some reason..)

Or something like that..
Not tested at all so no guarantees it works.. ;)
« Last Edit: 25 Jun 2006, 13:55:15 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.