Raised This Month: $ Target: $400
 0% 

Bleeding to death concept...?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XE_ManUp
Senior Member
Join Date: Mar 2005
Location: Charlotte, NC
Old 05-04-2005 , 00:59   Bleeding to death concept...?
Reply With Quote #1

As far as I understand, there are several areas that can be hit including:

HITGROUP_GENERIC 0
HITGROUP_HEAD 1
HITGROUP_CHEST 2
HITGROUP_STOMACH 3
HITGROUP_LEFTARM 4
HITGROUP_RIGHTARM 5
HITGROUP_LEFTLEG 6
HITGROUP_RIGHTLEG 7
HITGROUP_GEAR

Is there a way to have damage apply itself when a player is hit in the chest/stomach throughout the rest of the round so that the player "bleeds to death"?

Example:

Player X is shot by Player Y in the chest. Player X lost 50 health points upon being shot by Player Y, so Player X hides in a corner. As Player X is camping, he loses blood, weakening him/her at a slow, but sure rate.

Player Y is busy looking for Player X, but to no avail. Finally, Player X dies of blood loss.


I figure that this would be a great way to enhance the game (if you would enjoy the realism). Would this be possible?
XE_ManUp is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 05-04-2005 , 02:55   Re: Bleeding to death concept...?
Reply With Quote #2

Quote:
Originally Posted by XE_ManUp
Is there a way to have damage apply itself when a player is hit in the chest/stomach throughout the rest of the round so that the player "bleeds to death"?
...
Would this be possible?
Yes, there are a couple of ways to do it... either change the health directly or use the existing "damage to self" function and a timer... you could then base the bleeding on weapon, original damage, and hitzone...

/X
XAD is offline
SomeGuest
Junior Member
Join Date: Feb 2005
Old 05-04-2005 , 13:05  
Reply With Quote #3

I would like to see a realism plugin that makes players slower when shot in the leg. Or maybe increase spread and recoil when shots in the arms or hand. Oh and make headshots count and make kevlaar helmets actually work. Or leave a small trail of blood decals while the player bleeds to track him down.
SomeGuest is offline
XE_ManUp
Senior Member
Join Date: Mar 2005
Location: Charlotte, NC
Old 05-04-2005 , 20:44  
Reply With Quote #4

Okay...

XAD, if I were to use a timer, would that cause the server to be bogged down with internal lag from the timers for individual players?

My initial idea was for every 10 seconds after being shot in the chest/stomach, the player loses 5 health (and slows down, but that comes later).

The timer end of this is what I am concerned with. I don't want a plugin to lag the server, and am unsure whether timers running on 16+ individual players would do so.
XE_ManUp is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 05-05-2005 , 16:44  
Reply With Quote #5

Quote:
Originally Posted by XE_ManUp
Okay...

XAD, if I were to use a timer, would that cause the server to be bogged down with internal lag from the timers for individual players?

My initial idea was for every 10 seconds after being shot in the chest/stomach, the player loses 5 health (and slows down, but that comes later).

The timer end of this is what I am concerned with. I don't want a plugin to lag the server, and am unsure whether timers running on 16+ individual players would do so.
Well there are many ways to do it... you can implement it as one generic timer doing a check once per second (checked one time every frame). For each player you can have a health_lost_per_second value which you add to a health_lost var. When health_lost is more than 1 (or 5) you reduce both health and the health_lost var by 1 (or 5). This would also allow you to increase the bleeding for every hit and by different values depending on where the hit was taken. When player dies and at hud reset you set the health_lost_per_second value to zero.

You could also reduce the performance impact when no one is bleeding by having another indicator (someone_is_bleeding) which is set when someone starts to bleed. If this indicator is not set then you can skip the bleeding check totally and make the code overhead almost to nothing. If the flag is set (ie someone has been bleeding), then you unset it and loop through all players. If a player is bleeding then you do the bleeding stuff and also set the flag. This way when noone is bleeding anymore the flag will be unset and you bleeding check will be skipped again...

The overhead of doing the bleeding logic once a second will be very limited...

/X
XAD is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode