Is it possible to find a player's health?

SnickerPuffs

(*single chuckle*)
aa
Apr 10, 2014
1,315
1,857
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?
 
Sep 10, 2015
142
39
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?

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.
 

henke37

aa
Sep 23, 2011
2,075
515
Which player? Entity I/O doesn't have the ability to track players. You get into ugly hacks if you try.
 

EmNudge

L4: Comfortable Member
Sep 23, 2015
184
60
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.
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%
 

DrLambda

L69: Teeheehee, Member
aa
Feb 18, 2015
458
475
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%

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.