# Is it possible to find a player's health?

Discussion in 'Mapping Questions & Discussion' started by Gabe Noodle from Volvo, Sep 10, 2016.

1. ### Gabe Noodle from VolvoL3: Member

Messages:
142
Positive Ratings:
32
Is it possible to find a players health or if they're alive via hammer? And how would one do it?

2. ### aaHolySnickerPuffsBad at TF2, Loves Mapping For TF2

Messages:
949
Positive Ratings:
1,297
Also, building on this, would it be possible to filter a player by percentage of health. As in, only players with >15% health can enter, as having 15% or less health might kill you?

3. ### Gabe Noodle from VolvoL3: Member

Messages:
142
Positive Ratings:
32
I think you could use a math_remap for that, but you'd need one for each class since they have different health numbers. Just set the range from 0-100, and 15 would be 15 percent.

• Thanks x 1
4. ### aahenke37

Messages:
1,954
Positive Ratings:
465
Which player? Entity I/O doesn't have the ability to track players. You get into ugly hacks if you try.

5. ### Gabe Noodle from VolvoL3: Member

Messages:
142
Positive Ratings:
32
I just need the activator. It's not anything that can't be done without the macros.

6. ### 【EmNudge】L4: Comfortable Member

Messages:
184
Positive Ratings:
38
can you give me a quick rundown of the outputs and inputs on that?
I've never used math_remap before and that sounds pretty interesting.

This seemingly could allow me to make some sort of market garden arena - filtering it to soldiers only, give them full health and give them a trigger_hurt for 5 damage if their health is over 97%

Messages:
458
Positive Ratings:
454
If that's the problem you're trying to solve, you could try to directly set player health.

According to VDC:
SetHealth <integer>
Sets the player's health. Values clamped between 0 and max_health.

So, trigger_multiple -> OnStartTouch -> !activator SetHealth 195 could possibly work.

• Thanks x 1