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 / is there a way to do this ?

Author
Message
gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 24th Jul 2010 04:47
is there a way to make a script simular to the script that adds health , only instead of adding health , it adds an extra life.
I have went through tons of docs to try and find a way to make a script that does this ,
but I am kinda stumped so I have to ask if its even possible.

----------------
Gamerboots~
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jul 2010 11:46
I don't think vanilla FPSC can alter the player's life count.


Ummmmm -- but using Project Blue (or even Project Green, I believe) you should be able to change the $PL internal variable to alter the player's life count.

The following action should increase the player's lives by 1:



The one and only,


Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 25th Jul 2010 01:25 Edited at: 25th Jul 2010 01:28
Quote: " is there a way to do this ?"

Where the heck is Nickeydude with the unhelpful titles schpeel?

I love this title; it's almost like a "is this possible", and you already know my response, YES!

Quote: "I don't think vanilla FPSC can alter the player's life count."

Ply is right, there is no direct way to do it, but there is a work around.

Give the player excess lives at the start. (whatever you think the cap should be)
Then use any global variable for the player lives count, and display that as there lives instead of the real number.
So, in other words set the lives at ten or more or whatever but only start the variable at 3, and display that.
That way it appears as if we have only 3 lives and the player is none the wiser.
Then have a script that sets, reads, alters and displays the value of that variable running on the side.
If they pick up an extra life then just increment the variable.
Just decrement the variable once each time the player dies, and you are good to go.

Of course you would need to kill off the extra lives if they die three times and never get a extra life, but doing an endgame when the variable is at 0 is easy enough.


I'm not sure if I am making it clear enough, but it is doable in Vanilla with some creative scripting.

   Conjured Entertainment

 WARNING: Intense Madness
gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 25th Jul 2010 01:28 Edited at: 25th Jul 2010 01:38
I know you cant do it with vanalia. I'll rephrase the question. I'm trying to develope a script that will allow the player to pick up an item whitch will increase his life instead of health. I can read the global variable lives if making a hud, but how do I write to that variable ?

aww, I was about to ask whitch global variable is the lives so that Instead of doing a work around I could actually write to the variable directly ( again , is it possible to do this in place of having to do a work around )

----------------
Gamerboots~
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 25th Jul 2010 01:37 Edited at: 25th Jul 2010 01:38
Quote: "I know you cant do it with vanalia. I'll rephrase the question. I'm trying to develope a script that will allow the player to pick up an item whitch will increase his life instead of health. I can read the global variable lives if making a hud, but how do I write to that variable ?"

I guess I wasn't clear enough.
I know what you are trying to do, and I just explained a way to do it in vanilla.
Maybe someone else who understood me can explain it in a way that makes better sense to you, because I don't know how else to explain my workaround unless I show you.

The whole point is that you cannot increment that variable in vanilla FPSC during play.
You can only set the lives at the start.
That is why I am saying to set the lives very high, then use a fake number to display the live based on a global variable.
Since the player only sees the fake display, you can increment that variable to make it appear as if they got an extra life.
When in fact, they had it all the time, so in other words, it is an illusion.

If you end the game when the variable hits zero, then the player will never be the wiser that the number was a fake.

   Conjured Entertainment

 WARNING: Intense Madness
gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 25th Jul 2010 01:43
Quote: "The whole point is that you cannot increment that variable in vanilla FPSC during play.You can only set the lives at the start"

ok I thank you for your help.
I guess I'll have to do a quck work around script

----------------
Gamerboots~
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 25th Jul 2010 01:45 Edited at: 25th Jul 2010 01:45
Yeah, the lives display shouldn't be that many so you can do it all out of one script really.
Just remember to make the entity running invunerable by setting its health to 0, and also make sure the Always Active is set to YES.

Let me know how it works out for you.

   Conjured Entertainment

 WARNING: Intense Madness
gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 25th Jul 2010 01:51
I'll let you know how it works out for sure
maybe in the future they might add a "plraddlife command to an update, but until then I'll use the work around you suggested

----------------
Gamerboots~
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 25th Jul 2010 01:58 Edited at: 25th Jul 2010 02:06
I love how CE has a work-a-round for just about everything.

However, this does give me opportunity to showcase two commands I have in RPG Mod.

rpg_changeplayerlives=(number of lives)
rpg_changeplayerhealthmax=(amount of health)

With these commands you can change the number of lives and/or the maximum amount of health within a level.

RPG Mod is free and is quite stable. It basically is a RPG expansion of vanilla FPSC.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Jul 2010 09:16
Quote: " I could actually write to the variable directly ( again , is it possible to do this in place of having to do a work around )"


Well, if you know it can't be done in vanilla, and I just told you how to do it in PB (or heck, even PG, which is FREE) then what's the problem?


The one and only,


gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 25th Jul 2010 14:32
@ply
none all questions answered but one...
@flatlander
Quote: "With these commands you can change the number of lives and/or the maximum amount of health within a level"

did you have to recompile the source to make the mod to do this ?

----------------
Gamerboots~
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 29th Jul 2010 17:31
Quote: "Where the heck is Nickeydude with the unhelpful titles schpeel? "


Here I am!

Unhelpful Titles

Please do not simply write "Noob Question", "I am a newb", "One Noobie Question", "A question", "Please help", "This isn't working" or anything similar as the title of your post. We have a search facility, and meaningless titles do not help others find answers to their questions. It will also help you to get quicker responses if people have an idea of your thread content.



For KeithC
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Jul 2010 17:43
Since Flatlander hasn't answered himself, I'll go ahead and answer for him.

Yes, he altered the FPSC source code to make those commands.


The one and only,


gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 29th Jul 2010 23:17
Quote: "Yes, he altered the FPSC source code to make those commands"

I thought as much
Thank you for your response,

@ Nickydude
Unhelpful Titles ?
You must have been totally bored out of your mind to post that useless response.
feel free to change the topic to somthing different if you like and if you happen to have a better solution other than recompiling or doing as CE suggested then I'm all ears.

----------------
Gamerboots~
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 29th Jul 2010 23:27
Quote: "Unhelpful Titles ?
You must have been totally bored out of your mind to post that useless response.
feel free to change the topic to somthing different if you like and if you happen to have a better solution other than recompiling or doing as CE suggested then I'm all ears.
"


Uh, he's a moderator. That's his job. I would not mess with him. Unless you want a nice long vacation from these forums.

He's saying you could be more specific with your title, like in the future you could title it something like "How do I give the player more lives" or something.

gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 30th Jul 2010 00:09
yes the mod badge shows up clear. but rather than inflame this into an off-topic debate that will do no one any good I ask that unless someone has a better suggestion than the ones that have already been mentioned to please not respond.

----------------
Gamerboots~
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Jul 2010 01:20
Quote: "I ask that unless someone has a better suggestion than the ones that have already been mentioned to please not respond."


Wish granted.

Here's a better suggestion. Don't whine about a moderator stepping in to give you a friendly reminder about the rules here, unless you're wishing to carry the topic in that direction, in which case Shadowtroid is perfectly on-topic.
Nickydude is in no way required to change your title. He is reminding you that, just as you and everyone else should do before posting, many people search the forums for a topic relating to what they're looking for. If your thread is titled something useless and not pertaining to the subject matter at hand, then how do you expect them to find the information? Give your threads a proper, descriptive title and all will be fine... and then you won't have to get into these tussles with the Mod Squad.

If you honestly don't want to take this matter any further, feel free not to respond and we will carry on as though nothing happened.


The one and only,


Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 30th Jul 2010 01:41
Quote: "and then you won't have to get into these tussles with the Mod Squad. "


And you do NOT want that to happen.

gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 30th Jul 2010 04:33
heres another suggestion,
your right that I should have been more speciffic with the topic title. But just as I take your constructive critisisms with my topic title others may have to unfortnately take a little of mine as well. I actually aggreed with you and you should be happy, but now I'm going to dis-aggree with a lot of you:

If you guys become so scared of mods that you can not speak your honest opinions then thats your problem (for crying out loud, dont pubble in a corner just because they are a mod! )
how do you ever expect them to help you if their words are too holy for your ears to hear ?

now back ON topic,
I think I'll go with CE's idea for now, and later on when I have time I'll recompile the source and add some things. again thank you CE and Plystire for your suggestions. This thread may now peaceful die.

----------------
Gamerboots~
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Jul 2010 05:10
Well, I'm glad you agree with me, but this:
Quote: "If you guys become so scared of mods that you can not speak your honest opinions then thats your problem (for crying out loud, dont pubble in a corner just because they are a mod! )
how do you ever expect them to help you if their words are too holy for your ears to hear ?"

is just out of line.

Where in here are you seeing any of this happening?

We understand the need for Nickydude to monitor the helpfulness of thread titles. It helps people to find what they're looking for with the search feature, and in the end keeps the board just a little bit cleaner without so many repeated threads.

Now, if a moderator came in here and said something that I did not agree with, you can bet I would voice my opinion about it. Heck, I've been caught debating politics and (rarely) religion around the boards. We all know that's not allowed, but the subject matter came to it and it's not like anyone was afraid of making a moderator angry. Where you got this "everyone's scared of the mods" idea is beyond me, but nobody here is like that. Nickydude and all of the other moderators know full well that they're not "better" than us and they know we understand that and can talk to them like normal human beings.

I just want to make it clear here that I'm not trying to attack you or your opinion in any way here, just voicing my opinion because I felt the way you treated Nickydude's helpfulness lacked respect (not respect for a moderator, but respect for a person who is just here trying to help everyone out).


The one and only,


gamerboots
15
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 30th Jul 2010 07:37
aww, you expounded the point that I was making very well
and they have a big job keeping these forums clean and all so I guess you could say the part you quoted was written out of respect. well , I guess that means we agree on a couple more things
we are making progress lol.

----------------
Gamerboots~

Login to post a reply

Server time is: 2024-11-24 21:22:16
Your offset time is: 2024-11-24 21:22:16