Home   Help Search Login Register  

Author Topic: Allowdammage false for Resistance?  (Read 1629 times)

0 Members and 1 Guest are viewing this topic.

Offline Pr0ph3t

  • Members
  • *
Allowdammage false for Resistance?
« on: 08 Aug 2006, 05:58:06 »
Okay, this is a useful little feature for me because I use it for special effects. Like you're coming in on a boat it gets hit by a missle and everyone gets thrown out, except you survive because of allowdammage false. I noticed its been set to NULL in the newer versions (bear with me, I was using 1.0 until now) so what now? Can I make a loop or something to constantly set the health of the unit to 1? but even then, that tiny millisecond delay will kill him.. Anyway I'm not sure how to proceed with this, lemme know what you guys think

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Allowdammage false for Resistance?
« Reply #1 on: 08 Aug 2006, 10:07:07 »
It's surprisingly difficult to make invincible units.    I seem to remember using a loop with setDammage 0, and also attaching a hit eventHandler that set damage back to 0.   Either alone is insufficient.
Plenty of reviewed ArmA missions for you to play

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Allowdammage false for Resistance?
« Reply #2 on: 08 Aug 2006, 22:59:18 »
It's surprisingly difficult to make invincible units.

No it's not.

With event handlers we get the desired effect. Put the following into the initialization field of your unit:

Code: [Select]
this addEventHandler ["Hit", {_this select 0 setDamage 0}]; this addEventHandler ["Dammaged", {_this select 0 setDamage 0}]
You can keep alive and fighting even if enemy tanks are directing shells right on top of you. When you want the invincibility to end, just remove the event handlers. Or you could control it with a global variable:

Code: [Select]
this addEventHandler ["Hit", {if (BDO_invincible) then {_this select 0 setDamage 0}}]; this addEventHandler ["Dammaged", {if (BDO_invincible) then {_this select 0 setDamage 0}}]
Now, when you set the global variable BDO_invincible to true, your unit will be invincible. When you set it back to false, then you get things back to normal again.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re: Allowdammage false for Resistance?
« Reply #3 on: 09 Aug 2006, 02:15:02 »
I've found that even the EH-way can be nonfunctioning. It works better than the traditional getDammage-loop, but you can still die if you're unlucky.

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Allowdammage false for Resistance?
« Reply #4 on: 09 Aug 2006, 10:46:47 »
I've found that even the EH-way can be nonfunctioning. It works better than the traditional getDammage-loop, but you can still die if you're unlucky.

Have you tried it exactly like in my example (with both hit and dammaged eh's)? Because I have found no way to get killed with that, and I tested it in a couple of pretty exhaustive sessions, surrounded by lots of enemy troops (tanks, infantry) who all were shooting at me for at least half an hour per session. I'm pretty sure that my unit took bullets straight into the head too, and even that didn't kill my unit.

What 'unlucky' means here?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re: Allowdammage false for Resistance?
« Reply #5 on: 09 Aug 2006, 11:39:02 »
Yes, I've tried that, although that was quite a long time ago. I might misremember, or they've updated the command or something. Anyway, one theory that is in the back of my skull (might sound a little weird) is that when the CPU is overloaded, the EH's won't have time to react before you're dead because of the delay caused by the lag. Plausible? I have no idea. I'm not a computer freak. :P

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Allowdammage false for Resistance?
« Reply #6 on: 09 Aug 2006, 23:03:19 »
I must say dmakatra, that I am not convinced from your reply... I am suspecting that you only tried with one or the other, but not with both at the same time.

Sorry if I am terribly wrong  ;D

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Allowdammage false for Resistance?
« Reply #7 on: 09 Aug 2006, 23:31:34 »
not terribly wrong, no. just not giving flashpoint its quirky dues.

a hit, killed and dammaged event handler combo will allow for pretty much total invulnerability in practically all situations, but sometimes, just sometimes, one will get through.

surround yourself with 50 enemy loons and let it run. you'll see.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Allowdammage false for Resistance?
« Reply #8 on: 10 Aug 2006, 11:10:27 »
Killed EHs sometimes resurrect you after you're dead.    So you have the death music and cutscene, but you're still running around.   Very frustrating.

I never found any system that was 100% reliable.   However, as long as you have a combo of hit and dammaged (EH or loop) you'll be fine most of the time.   
Plenty of reviewed ArmA missions for you to play