logic_playerproxy

Half-Life 2: Episode 2 EP2
logic_playerproxy by RabidMonkey
Posted 14 years ago2009-11-05 07:19:52 UTC • Examples • Half-Life 2: Episode 2
Loading...
Screenshot Thumbnail
Name
logic_playerproxy
By
RabidMonkey RabidMonkey
Type
Map
Engine
Source
Game
Half-Life 2: Episode 2
Category
Examples
Included
RMF/VMF
Created
14 years ago2009-11-05 07:19:52 UTC
Updated
14 years ago2009-11-05 07:19:52 UTC
Views
5334
Downloads
1076
Comments
6
Download (4.31kb)

This setup demonstrates a setup of prop-based health kits which could be parented to a moving object, or positioned somewhere like a cabinet without being affected by physics. It uses the logic_playerproxy entity to determine the player's current health value before providing aid, to ensure players do not use health kits when they are already at full health.

This is just one example of what the entity is capable of; a similar setup could be created with ammunition boxes for specific weapons, for example.

6 Comments

Commented 14 years ago2009-11-05 08:38:03 UTC Comment #11459
I will keep this in mind when I get steam up again.
Also, Rabidmonkey posting a map? Your workload on BM must be lightening up! :D
Commented 14 years ago2009-11-05 10:41:17 UTC Comment #10570
Neat stuff.
Commented 14 years ago2009-11-06 17:28:08 UTC Comment #10571
wow i didnt even know that was possible. Good stuff
Commented 14 years ago2009-11-06 23:41:37 UTC Comment #10572
Forgive my ignorance of the HL2 inner workings, but shouldn't a player just kick around health packs when at full health instead of consuming them?
Commented 14 years ago2009-11-10 13:55:01 UTC Comment #8457
The key here is not being affected by physics. So nades dont blast them across the map.
Commented 14 years ago2009-11-12 04:54:37 UTC Comment #8458
Yes; health packs should act as normal physics objects, but there are some cases where this would be a problem.

Specifically, I had a level where players were on a moving tracktrain (boat) while fighting a helicopter. I needed a way to give the players health, but health chargers cannot be part of movement hierarchies. Normal physics-based health kits wouldn't work, either, because of the potential for collision errors, and health kits falling into the water where players couldn't access them. So, this was the next best solution - it provides the effects (adding health, sound, props disappearing) of using a health kit that players are used to, without any hard code. In most situations a regular health kit should suffice, and I would suggest using them over this method, because players are conditioned to being able to do specific things with certain items (like carrying health kits as physics props)

Plus being able to relay inputs/outputs to and from players, and using specific player actions or values (like ammo or health) has a number of possibilities for single-player games, like enemies that only spawn/attack when the player is above a certain health threshold, or events that occur in certain areas when the player uses their flashlight.

You must log in to post a comment. You can login or register a new account.