Author Topic: Adding Health via Damage  (Read 514 times)

I'm wondering, is it possible to add health to the player if they damage another player through a script? I searched "adding health" in Coding Help and din't get ay results, so some help would be nice. For example, the Black Box adds fifteen health everytime you damage another player. I want to know if the same thing can be done in a script.

Thanks for help.

definitely yes.

I'm sure it'd be as simple as modifying ProjectileData::Damage to add health to the person shooting.

You mean like, adding health to yourself when you do damage?
Or a projectile adding health to its target?

Either way, I recommend you refer to the TF2 Medic pack.

You mean like, adding health to yourself when you do damage?
Or a projectile adding health to its target?

Either way, I recommend you refer to the TF2 Medic pack.

Alternatively, he could look at the sticky thread directly above this topic.

Alternatively, he could look at the sticky thread directly above this topic.
True.

But referring to the medic pack sounds like it's more what he's going for.

Not really, since adding health to a player requires one line of code that I bet he could guess in one try.

Looked at the TF2 Medic Pack, I found the code I need. Thanks.