[solved] Check health and output?

Any aspects of level design for the Source engine.

[solved] Check health and output?

Postby marnamai on Sun May 11, 2008 10:05 pm

Is there a way I can check if the player is at full health?
If the player isn't at full health, I want to have an item spawned when he picks up a phys_prop.
I just don't want the item spawned if the players is at full health.

prop_physics => onplayeruse => pointclientcommand => command => give item_healthvial

edit: I think this can be done with a logic_playerproxy. It has the "RequestPlayerHealth" output.
edit: check health / if health <100 / fire command


edit: SOLVED

props_physics
=> output (onplayeruse/playerproxy/requestplayerhealth)
logic_playerproxy
=> output (playerhealth/compare/setvaluecompare) DO NOT SET A VALUE
=> output (playerhealth/compare/compare)
point_clientcommand
logic_compare (set initial and compare value to 100)
=> output (onlessthan/clientcommand/command/give item_healthvial)
point_clientcommand

the phys_prop gets an output to kill itself or break after its been used/consumed
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users