Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / weapon damage and health? How is that handled by the engine?

Author
Message
mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 27th Jan 2012 14:07
I'm playing around a little right now in FPSCX10. And a question arose in my mind.

Here's what I've done:

I have a weapon where I assigned the 'damage' property to 50 and an enemy where 'health' is set to 100.
Mathematicly I thought that it would require 2 bullets to kill the enemy. But I have to shoot him three times to kill him.
I have mixtured a little with the values, but nomatter what I do, the enemy takes one extra bullet before he dies. How come?

The reason I ask this is because I need to calculate the exact amount of bullets it takes to kill all enemies in a level.
Errant AI
19
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 27th Jan 2012 14:30
I don't know the exact math for it but I'm think that damage diminishes over distance. If you turn on entity info and check the hitpoint value, you should be able to figure it out.

If a coder happens by this thread, they should be able to check the source.
maho76
15
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 27th Jan 2012 14:41 Edited at: 27th Jan 2012 14:45
depends also on what weapon type you use. if you use a shotgun the damage is spread over an angle depending on distance to the enemy.
every weapon has some sort of accuracy-value. setting this to 0 means most effective damage per bullet when hit (as far as i understand and remember).

look into the gunspec of the weapons you wanna check.


Quote: "Complete syntax script list by ched80:
4.1.1.1 (ALT)ACCURACY=X
Description: This defines the accuracy of the gun‟s bullets.
Range: X = 0 and above with zero being the most accurate.
Example: accuracy = 50
altaccuracy = 10"


hope it helps.

mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 27th Jan 2012 17:21
Maybe it's distance dependant as well.

Even when I changed the accurancy of my weapon (a pistol) to 0, it still took three hits for the enemy to die. (this was when I shot him at close range)

At a distanced range it took four shots for him to die. (I think all bullets hit him, but I cannot be 100% sure that every bullet hit the target, I could have missed a shot)

Verywell! I could include that 'extra' bullet in my calculation. But It would be fun to know the excakt reason for this and how it is handled.

But I thank you guys. Yoyr replies halped me. Thanks!
Scene Commander
Support Manager
18
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 27th Jan 2012 17:58 Edited at: 27th Jan 2012 17:58
Hi,

All bullet damage, player and character is calculated like this

damage=weapon strength-a random number based on the damage/5

so if the weapon caused 100 damage by default, there would be a chance that this could be reduced by a maximum of 20

These are adjusted in V119 by the player/enity damage multiplier afterwards.

I hope that helps.

Best

SC

http://jimjamsgames.yolasite.com
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 6th Feb 2012 01:14
generally the reason is due to characters not being activated. shooting them sets them to active, that's when their health is able to count down. at least, this is so in my experience.

maho76
15
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 6th Feb 2012 09:40
Quote: "generally the reason is due to characters not being activated. shooting them sets them to active, that's when their health is able to count down. at least, this is so in my experience."


if this is the case then set them to always-active=yes, should solve your problem. tested it with 10-life-enemies and 5-dmg-shots this weekend and got exactly 2 shots per enemy.

Login to post a reply

Server time is: 2026-07-01 13:14:36
Your offset time is: 2026-07-01 13:14:36