Home   Help Search Login Register  


Author Topic: Force a unit to stay alive in ARMA?  (Read 1594 times)

0 Members and 1 Guest are viewing this topic.

Offline Rytuklis

  • Members
  • *
Force a unit to stay alive in ARMA?
« on: 15 Feb 2013, 20:26:17 »
Command this allowDamage false doesn't work
Command this allowDammage false works, but it still makes a unit harmable. Help?

Offline Gruntage

  • Missions Depot Staff
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Force a unit to stay alive in ARMA?
« Reply #1 on: 15 Feb 2013, 21:42:42 »
You need to use a 'hit' eventhandler. If you search for 'making units tougher' and 'invincibility', you're bound to find the answer to your question  :)
Some of the most memorable missions made involve the player doing very little...

"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline savedbygrace

  • Mission Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Force a unit to stay alive in ARMA?
« Reply #2 on: 14 Mar 2013, 02:33:12 »
It also really depends upon the amount of damage the unit sustains at once before the handler, or script can take effect. If the damage instantly inflicts total damage, such as an explosion, the handler will not likely be quick enough to reset the damage.

Hit handlers are quick but a fast looping script is quicker. Since it is continuously running and seeing as how you would only want it for testing or cinema, you wouldn't need it for long or in broad capacity, so its effect on CPU would be minimum.

Just have a looping script constantly setting the damage of the player/unit to 0.