Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Hey,is there a health regeneration script?

Author
Message
lukex10
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location: on your new computer.
Posted: 24th Jul 2008 15:19
i thought i saw a health reneration script the other day but now i cant find it hmmmm..

New pc for chrismas, Nvidia 9800gtx ,ADM phenom 6.3ghz, 4gb ram ,250 gb hard drive.windows vista home premium.
Minimovies Inc
16
Years of Service
User Offline
Joined: 22nd Feb 2008
Location: Reeedwwwaaallll!!!
Posted: 24th Jul 2008 15:23
Well, it should be extremely simple to make.
I'll get to it in a while, I need the practice anyway!
So, is it that the player can regenerate his health automatically but slowly over time?

A starting Games Designer. Need levels, characters and anything drawn and designed? Let me know...
lukex10
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location: on your new computer.
Posted: 24th Jul 2008 15:26
Yhh like on Call of duty 4 and halo 3 and thanks soo much.

New pc for chrismas, Nvidia 9800gtx ,ADM phenom 6.3ghz, 4gb ram ,250 gb hard drive.windows vista home premium.
Minimovies Inc
16
Years of Service
User Offline
Joined: 22nd Feb 2008
Location: Reeedwwwaaallll!!!
Posted: 24th Jul 2008 15:37
Here is my Health regeneration script:




;Artificial Intelligence Script

;Header

desc = Player regenerates his health slowly over time.

;Assign this script to a crate or cylinder entity etc.
;The "timergreater" is a timer, in this case the player will receive 1 health every 5 seconds. Can be changed by changing the 5 to a different number.
;change the plrhealthless and plrhealthgreater number to a different one if you set your players max health differently.

;Triggers

:state=0:timerstart,state=1
:state=1,plrhealthless=500,timergreater=5000:plraddhealth=1,state=0
:state=1,plrhealthgreater=500,timergreater=5000:state=0

;End of Script



I hope it works as it's untested and it's my second ever script!

A starting Games Designer. Need levels, characters and anything drawn and designed? Let me know...
lukex10
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location: on your new computer.
Posted: 24th Jul 2008 15:40
what would you put the script on the? is the the player start marker?

New pc for chrismas, Nvidia 9800gtx ,ADM phenom 6.3ghz, 4gb ram ,250 gb hard drive.windows vista home premium.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 24th Jul 2008 17:18 Edited at: 24th Jul 2008 17:21
A. It says in his script where to put it.
B. You should actualy put it on a dynamic light.

Looks good. Also, just for reference, there ie a code button on the top that when pressed, adds a line of tezt, then you enter your code under it, then press it again to add a closing line.





Minimovies Inc
16
Years of Service
User Offline
Joined: 22nd Feb 2008
Location: Reeedwwwaaallll!!!
Posted: 24th Jul 2008 21:05


A starting Games Designer. Need levels, characters and anything drawn and designed? Let me know...
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 25th Jul 2008 00:19
Perfect

Hyokin
16
Years of Service
User Offline
Joined: 24th Apr 2008
Location: Assaulting the Control Room.
Posted: 25th Jul 2008 18:30
Does it regenerate to 500(full) or to what the player starts with?
Example: I set my Player Start to begin the player with 100 Health, will it raise the health beyond that to 500?

Your Destruction is the will of the gods.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Jul 2008 23:30
I do not believe it will allow the player to have more health than the start marker dictates is the player's "Max Health"... so, no, it won't let the player get anymore than you want them to have, but editing the script and adjusting it to your players' needs, then it will save a little bit of processing time.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 27th Jul 2008 00:53
Is there a command to set the player max health, like thenewjumpheight command? I don't think so, but that would be something nice to mention to Lee.

CamaroBee
16
Years of Service
User Offline
Joined: 5th Jan 2008
Location:
Posted: 4th Sep 2008 05:34
How can I make all of my health regenerate after the time limit. I tried setting the add health value to 100 (which is the max health) so in theory it would regenerate all but not go past the 100 max health.

Login to post a reply

Server time is: 2024-11-24 11:54:59
Your offset time is: 2024-11-24 11:54:59