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 / [LOCKED] Health Restore

Author
Message
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 20th Apr 2009 21:40
Hey, Has anyone got a script that gives you full health (100hp) once you enter the zone but it only happens once?

PS I have PLY'S mod so the variable commands may be slightly different...
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 20th Apr 2009 22:13
This is actually do-able in the stock version of FPSC:

state=0, check player's health < 100:set player health = 100,state=1

Player walks into zone with health less than 100 the first time, and his/her health goes to 100 and the state goes to 1. player walks into zone with health less than 100 after the first time, nothing happens.

Priest of the Church of Joe Wood
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 20th Apr 2009 22:44
actually it would be more like this if you don't want the script to take up CPU:state=0,check the health:set the plr health=100,suspend.
Your pseudo code works Leon but this way is more CPU friendly.

...
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 21st Apr 2009 18:45
Thanks i'll try it
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 21st Apr 2009 19:38
Quote: "actually it would be more like this if you don't want the script to take up CPU:state=0,check the health:set the plr health=100,suspend.
Your pseudo code works Leon but this way is more CPU friendly"

You are correct, and I should have coded it that way instead.

Priest of the Church of Joe Wood
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 21st Apr 2009 19:47
Also does anyone have a health restore like COD4 for PLY'S MOD?
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 22nd Apr 2009 02:05
step1: assign player health to user variable
step2: when player health decreases, start timer
step3: when timer reaches desired amount go to step two
step4: if plr health is back to normal, go to step1

...
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 22nd Apr 2009 19:11
Ah! There is a fault in your logic... If the player is in a fire fight and he has been reduced to one health when the timer starts up, then he will restore all his health and the timer had started from the first piece of dammage, if the player has his health restored to 100 each time during the fire fight from the first bullet then he can just stand and shoot and his health will repeatedly restore. The health needs to begin its restore from the last piece of dammage taken by the user. This problem can easily be sorted be having a variable at the beginningof the command. If you re-read my post:

Quote: "Also does anyone have a health restore like COD4 for PLY'S MOD? "


I said:

Quote: " have "


this is because i dont really want to waste any time scripting somethin like this...
Pride
16
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 22nd Apr 2009 20:26 Edited at: 22nd Apr 2009 20:29
Quote: "this is because i dont really want to waste any time scripting somethin like this... "

Then get out.

This forum section was created so one could become better at scripting and post scripts, NOT request scripts. If you don't have the time, get out of here and read the stickies, this is a no request forum. Prepare to be noob slapped, my friend.

I have a script like this, but your vain and lazy attitude made me rethink giving it out.


"Tempo non é só unha teoría, senón unha forza"
Try and figure it out
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 22nd Apr 2009 21:34
Well said Pride. I would have helped you make a script like that but you have to at least try to make it yourself.

...
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 22nd Apr 2009 23:23
Pride, I couldn't have said it better myself. If people aren't going to learn scripting - even basic scripting - then they should probably use a different application to create games.

Priest of the Church of Joe Wood
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 23rd Apr 2009 01:38
Be careful with your responses please.

If you dont like what people say in their posts then just dont reply at all unless its with courtesy at all times. There are no excuses for anything less from anyone.

If you have a point to make please do it politely. If you dont want to help others then you do not have to. But please do not be agressive or offensive.

Some of the replies here and elsewhere towards others are just as unacceptable as some of the original topics or post questions.

If it continues sooner or later the mods will clamp down as they do and clean up and all will suffer.

These forums are not here for the benefit of one section of users whether they are experienced and experts in one particular discipline of game makeing with FPSC or not. Far from it FPSC is specifically designed and intended to be the very opposite and it exists because it is a click and play engine available to the mass of people that have little gamemaking knowledge but who want to "Have a Go". These form by far the largest proportion of purchasers without who non of this would never have come into being or continue.

These forums themselves at any one time make up just a very small portion of FPSC purchasers. You have no exclusive right to tell others to go away. All are welcome as long they abide by the rules and that means everyone.

Tolerance will continue to be required.



Pride
16
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 23rd Apr 2009 03:11
Alright, thanks for the heads-up UMan, I'll remember to be a bit more polite next time.


"Tempo non é só unha teoría, senón unha forza"
Try and figure it out
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 23rd Apr 2009 09:31
All i was askin is whether anyone had already made the script, i can if i want make it myself and if it came to that, because im not an experianced scripter, and i am in to process of makeing some zombie mod scripts, it would take me a while... You all reacted like bush had just been realected into the white house...? Excuse my spelling...
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 23rd Apr 2009 20:54
Quote: "You all reacted like bush had just been realected into the white house"


This will lead to a political discussion, which is banned, and eventually a lock.

Quote: "im not an experianced scripter"


You have to start somewhere.

Quote: "it would take me a while"


Scripting doesn't just take 30 seconds. You actually need to put some time and effort into writing a script.

You NEED to learn. Scripting is an essential skill and is very easy to do with FPSC.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 23rd Apr 2009 23:15
Well i know it well enough to write my own zombie mod... All it was was a simple request... I thought that someone would be quite proud to have the knowlage that other people are benefiting from what they have done... When my zombie mod scripts are finished there gonna be free... There all done i just need to link variable decloration between scripts on plys mod (I have two ideas on how to try this but i need a bit of help...)
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 23rd Apr 2009 23:30
What do you have so far on the variable linking? Maybe I can help.

...
uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 23rd Apr 2009 23:46
Pride

No worries. I understand the frustrations of both sides of the coin as it were.

Were it not for those skilled members who kindly contribute to this and the other boards by helping and sharing their hard work with us all we would not have such good resources that benefit us all.

Hopefully newer members who perhaps have less experience will themselves contribute too as they gain some. In the meantime it would be helpful if they made a little more effort to look for the answers they need from the wealth of those resources already available which often can provide the help and answers they seek in some cases.

Personally I am hopeless at .fpi scripting and just do the best I can by trial and error.



Login to post a reply

Server time is: 2024-11-25 00:48:19
Your offset time is: 2024-11-25 00:48:19