Home   Help Search Login Register  

Author Topic: Cheating Death  (Read 1933 times)

0 Members and 1 Guest are viewing this topic.

fragsta

  • Guest
Cheating Death
« 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?

Knut Erik

  • Guest
Re:Cheating Death
« Reply #1 on: 25 Aug 2003, 18:07:03 »
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.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Cheating Death
« Reply #2 on: 25 Aug 2003, 18:45:32 »
I'm not sure if that'll work, but you could give it a try.

Knut Erik

  • Guest
Re:Cheating Death
« Reply #3 on: 25 Aug 2003, 20:53:39 »
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... ::) )


Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Cheating Death
« Reply #4 on: 25 Aug 2003, 21:50:54 »
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

fragsta

  • Guest
Re:Cheating Death
« Reply #5 on: 25 Aug 2003, 23:34:55 »
can u explain this fuller please everyone? i've never used event handlers before

RED

  • Guest
Re:Cheating Death
« Reply #6 on: 26 Aug 2003, 10:48:39 »
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

Komuna

  • Guest
Re:Cheating Death
« Reply #7 on: 26 Aug 2003, 10:55:07 »
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'.

RED

  • Guest
Re:Cheating Death
« Reply #8 on: 26 Aug 2003, 11:06:56 »
I just tested it and it does work using the hit and killed eventhandlers on the player.

RED

Komuna

  • Guest
Re:Cheating Death
« Reply #9 on: 26 Aug 2003, 12:03:34 »
So you can avoid the player from being killed, through an event handler ("killed", for example)?!
Now i'm having doubts! ::)

RED

  • Guest
Re:Cheating Death
« Reply #10 on: 26 Aug 2003, 19:28:46 »
Yes, don't knock it till you try it :)

RED