OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: fragsta on 24 Aug 2003, 22:44:23
-
I know this has probably been said before, but the physics and realism in OFP is a bit iffy at times. Such as, when someone crashed a helicopter not too badly, they might not actually die, but hurt themselves badly. Is there a script or anything to stop people from dieing? I tried making their health better when they die, and it works, but by the time u notice the game has ended and the music comes on and u see a famous war quote....so.....ne1 got ne suggestions?
-
Hm. To prevent a unit to die, try this
Man1 addEventHandler ["Killed","Man1 setDammage 0"] ; Man1 addEventHandler ["Hit","Man1 setDammage 0"]
Offcourse you'll need to add n' remove'em as the unit goes in and out of vehicles.
-
I'm not sure if that'll work, but you could give it a try.
-
I'm not sure if that'll work, but you could give it a try.
What do ya mean ?? ???
It have allways worked for me.
I use this method when I test my missions ;D (I'm a goddammed cheater... ::) )
-
It did? I always get the "you're dead" ending when I get shoot, even if my soldier stands there at full health. But then again, that was some time ago and I used the Not Alive command instead of addeventhandler. ;D
-
can u explain this fuller please everyone? i've never used event handlers before
-
Name a unit man1, in his init field (or triggers onactivation field) put:
Man1 addEventHandler ["Killed","Man1 setDammage 0"] ; Man1 addEventHandler ["Hit","Man1 setDammage 0"]
RED
-
You can only use those event handlers or conditions on AI units. You could try using the 'hit' event handler on the player to avoid him from being killed, yet if he gots deadly shot no event handlers will prevent the EndDialogue ("YOU'RE DEAD").
I've also noticed that in OFP1.91, killed units will nolonger be available... At least with armored ones... which I couldn't 'ressucitate'.
-
I just tested it and it does work using the hit and killed eventhandlers on the player.
RED
-
So you can avoid the player from being killed, through an event handler ("killed", for example)?!
Now i'm having doubts! ::)
-
Yes, don't knock it till you try it :)
RED