Yes hello all!
I would like to know if there is a way to enable or control health regeneration in the Half-Life 2: Episode 2 engine. I am making a mini-mod but want to have health regeneration in the style of Portal.
I do not want to have a large brush that is constantly giving me health, as that is rather tacky.
Any help or direction for me to be led in would be superb! I searched the forums, but alas, nothin.
1
Re: Regenerating health in HL2E2
Posted by Dark Tree on Thu May 13th at 1:13am 2010

Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA
Occupation: DigiPen student
Posted by Dark Tree on Thu May 13th at 1:13am 2010
Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA

Occupation: DigiPen student
Re: Regenerating health in HL2E2
Posted by Riven on Thu May 13th at 8:40am 2010

Riven
super admin
1639 posts
802 snarkmarks
Registered: May 2nd 2005
Location: Austin, Texas, USA
Occupation: Architect
Posted by Riven on Thu May 13th at 8:40am 2010
Hmm, outside of coding a new entity to do just that, the best way I could think of would be to use the logic_playerproxy entity.
You could enable a logic_timer with an interval of 0.1 and to send an output to the playerproxy
>On Timer; playerproxy; SetPlayerHealth; 100.
Or if you don't want it to affect the player until they get to a certain level of health, you could use the "RequestPlayerHealth" input on the playerproxy to send an output to a logic_compare which would then decide based on whatever level of health you deem too low whether to heal the player then or not.
No volumes needed!
You could enable a logic_timer with an interval of 0.1 and to send an output to the playerproxy
>On Timer; playerproxy; SetPlayerHealth; 100.
Or if you don't want it to affect the player until they get to a certain level of health, you could use the "RequestPlayerHealth" input on the playerproxy to send an output to a logic_compare which would then decide based on whatever level of health you deem too low whether to heal the player then or not.
No volumes needed!
Riven
super admin
1639 posts
802 snarkmarks
Registered: May 2nd 2005
Location: Austin, Texas, USA

Occupation: Architect
Re: Regenerating health in HL2E2
Posted by Niborius on Thu May 13th at 7:24pm 2010
Posted by Niborius on Thu May 13th at 7:24pm 2010
Wow Riven is there anything about source mapping you don't know?
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Regenerating health in HL2E2
Posted by omegaslayer on Thu May 13th at 8:41pm 2010

omegaslayer
member
2481 posts
401 snarkmarks
Registered: Jan 16th 2004
Location: Seattle, WA
Occupation: Sr. DevOPS Engineer
Posted by omegaslayer on Thu May 13th at 8:41pm 2010
DigiPen?! You jerk I wanted to go there, but alas no $$ to pay for it. Be sure to say hi to Brian for me 
omegaslayer
member
2481 posts
401 snarkmarks
Registered: Jan 16th 2004
Location: Seattle, WA

Occupation: Sr. DevOPS Engineer
Re: Regenerating health in HL2E2
Posted by Niborius on Thu May 13th at 8:48pm 2010
You're not making sense
Posted by Niborius on Thu May 13th at 8:48pm 2010
Quoting omegaslayer
DigiPen?! You jerk I wanted to go there, but alas no $$ to pay for it. Be sure to say hi to Brian for me 
You're not making sense
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Regenerating health in HL2E2
Posted by omegaslayer on Thu May 13th at 9:06pm 2010
You're not making sense
Look at his occupation: "digipen student". DigiPen is a school for game design up in Washington in the united states. The creators of Portal (and now portal 2) graduated from DigiPen and were scooped up by Valve. Its basically one of the most prestigious schools to learn art (for game art), or a computer science degree (for graphics/game logic/networking). Valve, Microsoft, and Nintendo (which is right next door to the school's building) hire people who graduate from there directly practicality. I wanted to go to the school there but it was very expensive, more money that I could afford even if I took out loans to pay for it.
I know a guy named Brian (IcedEagle) who goes there (rather hes graduating this year I believe).

omegaslayer
member
2481 posts
401 snarkmarks
Registered: Jan 16th 2004
Location: Seattle, WA
Occupation: Sr. DevOPS Engineer
Posted by omegaslayer on Thu May 13th at 9:06pm 2010
Quoting Niborius
Quoting omegaslayer
DigiPen?! You jerk I wanted to go there, but alas no $$ to pay for it. Be sure to say hi to Brian for me 
You're not making sense
Look at his occupation: "digipen student". DigiPen is a school for game design up in Washington in the united states. The creators of Portal (and now portal 2) graduated from DigiPen and were scooped up by Valve. Its basically one of the most prestigious schools to learn art (for game art), or a computer science degree (for graphics/game logic/networking). Valve, Microsoft, and Nintendo (which is right next door to the school's building) hire people who graduate from there directly practicality. I wanted to go to the school there but it was very expensive, more money that I could afford even if I took out loans to pay for it.
I know a guy named Brian (IcedEagle) who goes there (rather hes graduating this year I believe).
omegaslayer
member
2481 posts
401 snarkmarks
Registered: Jan 16th 2004
Location: Seattle, WA

Occupation: Sr. DevOPS Engineer
Re: Regenerating health in HL2E2
Posted by Le Chief on Thu May 13th at 11:35pm 2010
Posted by Le Chief on Thu May 13th at 11:35pm 2010
I was able to achieve this effect in Half-Life 1 with a bit of code but Riven's suggestion sounds good. No brush based entities!
Re: Regenerating health in HL2E2
Posted by Niborius on Fri May 14th at 6:29am 2010
Ok that does make sense
and now that you mentioned it again I think I heard of DigiPen before. Anyways thanks for explaining
Posted by Niborius on Fri May 14th at 6:29am 2010
Quoting omegaslayer
Look at his occupation: "digipen student". DigiPen is a school for game design up in Washington in the united states. The creators of Portal (and now portal 2) graduated from DigiPen and were scooped up by Valve. Its basically one of the most prestigious schools to learn art (for game art), or a computer science degree (for graphics/game logic/networking). Valve, Microsoft, and Nintendo (which is right next door to the school's building) hire people who graduate from there directly practicality. I wanted to go to the school there but it was very expensive, more money that I could afford even if I took out loans to pay for it.
I know a guy named Brian (IcedEagle) who goes there (rather hes graduating this year I believe).
I know a guy named Brian (IcedEagle) who goes there (rather hes graduating this year I believe).
Ok that does make sense
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Regenerating health in HL2E2
Posted by G4MER on Fri May 14th at 2:43pm 2010
Posted by G4MER on Fri May 14th at 2:43pm 2010
They were at PAX in the BYOC area.. met some of them.. they had some student made games there on thumb drives they gave out.
Re: Regenerating health in HL2E2
Posted by Dark Tree on Mon May 17th at 4:28am 2010

Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA
Occupation: DigiPen student
Posted by Dark Tree on Mon May 17th at 4:28am 2010
Thank you Riven, I will try that out and let you know how it works out!
lol if I see him I'll sure let him know you said hi.
Muynay: You were at PAX? Hm, if you go next year I'll seeya there!
Quoting omegaslayer
Be sure to say hi to Brian for me
lol if I see him I'll sure let him know you said hi.
Muynay: You were at PAX? Hm, if you go next year I'll seeya there!
Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA

Occupation: DigiPen student
Re: Regenerating health in HL2E2
Posted by Carcase on Thu Jun 17th at 6:00am 2010
Posted by Carcase on Thu Jun 17th at 6:00am 2010
You say to use a logic_compare, what parameter do you set its compare value to with the player proxy? Is there a !value or something?
Re: Regenerating health in HL2E2
Posted by Riven on Thu Jun 17th at 6:11pm 2010

Riven
super admin
1639 posts
802 snarkmarks
Registered: May 2nd 2005
Location: Austin, Texas, USA
Occupation: Architect
Posted by Riven on Thu Jun 17th at 6:11pm 2010
By using the "RequestPlayerHealth" Input value for the logic_playerproxy via the logic_timer, that input links with the logic_playerproxy's "PlayerHealth" output value, passing along whatever the player's health is at the last time the health request input was used. So, that value outputs the actual value of the player's health, which you could send to the logic_compare. something along the lines of:
PlayerHealth; logic_Compare; SetCompareValue; <none>
PlayerHealth; logic_compare; Compare; delay: 0.001
^That's the output coming from the logic_playerproxy to the logic_compare. You leave the parameter value empty because the output will fill it in automatically.
So, now looking at the logic_compare you'd set the Initial value in the class keyvalues to whatever number you'd like the lowest health for a player to be at before getting automatically healed. So for example, if you don't want the player to be automatically rejuvenated until they're at 45 HP, then you'd type 45 in the "initial value" keyvalue box.
When the logic_compare receives the input from the logic_playerproxy, you may use this output from the logic_compare:
OnLessThan; logic_playerproxy; SetPlayerHealth; 100
So, when the logic_playerproxy sends the "compare" output, the player should be re-healed, and all this happens in less than 1/100th of a second, checking every 1/10th of a second to do it again.
Does all that make sense? I'm trying to re-check to see if it does, so hopefully it's not too convoluted.
PlayerHealth; logic_Compare; SetCompareValue; <none>
PlayerHealth; logic_compare; Compare; delay: 0.001
^That's the output coming from the logic_playerproxy to the logic_compare. You leave the parameter value empty because the output will fill it in automatically.
So, now looking at the logic_compare you'd set the Initial value in the class keyvalues to whatever number you'd like the lowest health for a player to be at before getting automatically healed. So for example, if you don't want the player to be automatically rejuvenated until they're at 45 HP, then you'd type 45 in the "initial value" keyvalue box.
When the logic_compare receives the input from the logic_playerproxy, you may use this output from the logic_compare:
OnLessThan; logic_playerproxy; SetPlayerHealth; 100
So, when the logic_playerproxy sends the "compare" output, the player should be re-healed, and all this happens in less than 1/100th of a second, checking every 1/10th of a second to do it again.
Does all that make sense? I'm trying to re-check to see if it does, so hopefully it's not too convoluted.
Riven
super admin
1639 posts
802 snarkmarks
Registered: May 2nd 2005
Location: Austin, Texas, USA

Occupation: Architect
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0165 seconds.

Snarkpit v6.1.0 created this page in 0.0165 seconds.




