OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: nimierkki on 24 Jun 2006, 14:43:51
-
Do anyone know how to do Immortal plane?? thx sorry my english
-
You may try to write the following into the plane's INIT field:
this addeventhandler ["Hit",{(_this select 0) setdammage 0;driver (_this select 0) setdammage 0;gunner (_this select 0) setdammage 0}]
-
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
-
setdammage 0;cargoI think...
-
setdammage 0;cargo
I think...
Not exactly...
"_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.. ;)