Author Topic: Very high zombie health equation  (Read 568 times)

0 Members and 1 Guest are viewing this topic.

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Very high zombie health equation
« on: December 27, 2008, 04:01:23 am »
I am almost finished with an alpha version of my Zombie RPG script but I have encountered a problem with the way I calculate damage, the healths of all enemys (and humans if i want) are not the normal 150, here is my equasion in onplayerdamage
Code: [Select]
result := round(Players[Shooter].dmgm * (IGB[Shooter].BDamage * ((strtofloat(inttostr(Damage)) * (150 / strtofloat(inttostr(IGB[victim].BHealth)))))))This works quite well for the average zombies with Bhealths of 10-1000 but i have one zombie that will be a rare occurance for high lvls that has 10000 health and this will only do damage if you get a headshot from a barret or something else very damageing. (i know i could set it to always be atleast 1 but that would severly amplify the damage of anything damaging the bot)

Is there any way to make this equation work with extreme health?

Thank you

Side Question: Is there any way to use a minor weapon mod without having the (WM) infront of your server name without editing and reloading the weapons.ini at the serverstart and serverclose? Thank you


Offline GSx_Major

  • Major
  • *
  • Posts: 97
Re: Very high zombie health equation
« Reply #1 on: December 27, 2008, 10:58:07 am »
Well, with the way you're going you kinda have to make it at least 1. If that's a problem, you should limit the damage by making it not do damage if the shooter isn't an enemy, or rule out specific weapons or people of lower levels, etc...

Or, you could have a separate var to keep track of a player/bots current health and use that to set the players actual health.
...and headbutt the sucker through your banana suit!