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 / Health Recharge Script

Author
Message
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 14th Jul 2010 02:59
I've been trying to make a recharging health script for about a month now, and I just can't seem to get it. I want it to be kind of like a Halo/Crysis type recharge, so about 5 seconds after getting damaged, your health would recharge, but would stop and wait another 5 seconds if you got hit again. I also want it to be like if you entered a Healing zone, not just an instant 50 to 100. I don't know if it's possible, but I'm curious if anyone could guide me or give me a script. I attached what I currently have (note that it doesn't work, so maybe someone could edit it?

Attachments

Login to view attachments
zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 14th Jul 2010 03:54
By the setvar= in your script I'll assume you have Project Blue, but last time I assumed I was completely off, so what version are you using?

I'd change the world, but I don't have the source code
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 14th Jul 2010 08:57
Oh, actually, that was the wrong script... this one is the right one.

And also, do you mean the version of FPSC? That would be 1.17 (I can't get ragdoll to work though, go figure...)

And I don't use any mods as of yet (excluding the integrated Airmod)

Attachments

Login to view attachments
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 15th Jul 2010 02:58
Oh, now I got ragdolls to work I'll continue working on my script I guess...
SH4773R
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 22nd Jul 2010 00:38
Ill take a look and see what I can do if I do help will I get credited?

Who the hell is General Failure? And why is he trying to read my hard disk?

My software never has bugs. It just develops random features.
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 22nd Jul 2010 00:42
Looks to me like this line is your problem.

:state=0,shotdamage=0:state=1

Shotdamage checks if the ENTITY took any damage.

Sadly there is no way to check if the player has taken damage without PB (maybe fenix).

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Jul 2010 01:08
There is an extremely long-winded way of doing it in vanilla (since conjured hasn't shown up yet, guess I'll kinda fill in for him )

It involves checking player's health, setting a variable according to that health. Then checking healthless alongside the variable's value to find out if the player got hurt. To make it accurate, it would take a LOT of scripting (depending upon how much health you decide to give your character)


The one and only,


Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 23rd Jul 2010 04:37
@Ply

I think I tried doing that once...Man, I hated that. Line after line of essentially the same code. Too much work for too little reward.

Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 23rd Jul 2010 11:12 Edited at: 23rd Jul 2010 18:02
Commico Inc, of course!

Shadowtroid, I was considering that, because when I tried scripting it before using an 'instant' recharge, it worked, and that line wasn't there.

Plystire, I was going to do that, but like you and Shadowtroid said, it's not really worth the time. I may do it though, since it's the Summer...

Thanks for the support.

EDIT: I have it attached, when I get hurt, it automatically ignores the timer, anyone know how to fix that?

Attachments

Login to view attachments
Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 24th Jul 2010 04:49 Edited at: 24th Jul 2010 04:51


Here's an easier one

Fully customizable, very short and easy

To anyone who lives in England: I liked London when I went two weeks ago.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jul 2010 11:48
Quote: "but would stop and wait another 5 seconds if you got hit again"


I don't think your script satisfies that condition, le shorte.


The one and only,


SH4773R
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 24th Jul 2010 12:45
So change timergreaterthan to 5000

Who the hell is General Failure? And why is he trying to read my hard disk?

My software never has bugs. It just develops random features.
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 24th Jul 2010 14:06
All le shorte's does is put a delay inbetween when you get 5 health. Basically, no matter when you were hit, you get 5 health every second.

Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 24th Jul 2010 18:18
Quote: "Basically, no matter when you were hit, you get 5 health every second."



Ehh, it was worth a shot

To anyone who lives in England: I liked London when I went two weeks ago.
SH4773R
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 24th Jul 2010 20:29
Lol

Who the hell is General Failure? And why is he trying to read my hard disk?

My software never has bugs. It just develops random features.
Akanto10
14
Years of Service
User Offline
Joined: 24th Apr 2010
Location: Earth
Posted: 24th Jul 2010 22:31
Well thanks le shorte, I like the effort.
Le Shorte
15
Years of Service
User Offline
Joined: 6th Apr 2009
Location: Wisconsin
Posted: 25th Jul 2010 01:49
No problem

To anyone who lives in England: I liked London when I went two weeks ago.

Login to post a reply

Server time is: 2024-11-24 21:40:50
Your offset time is: 2024-11-24 21:40:50