Home   Help Search Login Register  

Author Topic: How to strengthen tanks armor  (Read 1361 times)

0 Members and 1 Guest are viewing this topic.

Offline HedgeHog

  • Members
  • *
How to strengthen tanks armor
« on: 01 Oct 2008, 23:27:28 »
I'm building a mission in which I need three tanks to survive in a battle for a longer time than normal, so I need a script to strengthen their armor and make them last longer.

Can you suggest me an easy way to make this? :)


Thank you in advance! :D

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: How to strengthen tanks armor
« Reply #1 on: 02 Oct 2008, 04:03:34 »
Why not just setDamage 0 from a hit eventhandler, so their damage is reset to nil each time they are hit ... until you want to revert to normal again.

Comref definition of setDamage.

Tutorial about eventhandlers.


Planck
« Last Edit: 02 Oct 2008, 16:39:27 by Planck »
I know a little about a lot, and a lot about a little.

Offline Turk

  • Members
  • *
Re: How to strengthen tanks armor
« Reply #2 on: 02 Oct 2008, 19:00:04 »
I played around with this a while back, try adding this to the INT of the tank.

Code: [Select]
this addEventHandler ["HIT",{(_this select 0) setDamage (0.91 * damage (_this select 0));}];
In tests with this setting a M1A1 took 6 M136 rockets up the rear before it exploded as opposed to 2 before the Eventhandler. For the tank to take more damage decrease the setdamage value from 0.91 to something like 0.90/0.89 etc etc, if you set it much lower then this the tank will take forever to die.

You will have to play around with different values for different types of armor I guess.

http://www.ofpec.com/forum/index.php?topic=29789.0

Turk.

Offline HedgeHog

  • Members
  • *
Re: How to strengthen tanks armor
« Reply #3 on: 03 Oct 2008, 00:14:07 »
Thank you (Or should I say Tank You? ahah! :D)


I'll try as soon as possible! :)