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 / scoring system for fpsc?

Author
Message
jrzombie
11
Years of Service
User Offline
Joined: 16th Feb 2013
Location: irving tx usa
Posted: 17th Feb 2013 06:26
i need help. i really need a scoring and point system for fpsc. i would like for when the player shoots and destroys thing he gets points for the kills and maybe a recap of total score at the end of each level. thanks in advance for any help on the subject.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 18th Feb 2013 13:25
a small hint:
http://forum.thegamecreators.com/?m=forum_view&t=178003&b=23
just translate it into fpsc vanilla(easy)


Burger
12
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 28th Feb 2013 06:22
Perhaps conjureds cash system is right for you. It's good for learning about variables and such (at least, it was what helped me wrap my head around them)

http://forum.thegamecreators.com/?m=forum_view&t=130281&b=24

http://forum.thegamecreators.com/?m=forum_view&t=190353&b=23

The last thread deals with destroy scripts, so it may be suitable.

- An Instinctive Fear IndieDB page, download demo today!
Meows
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 10th Mar 2013 01:27
Script by Conjured Entertainment
countyourkills.fpi


PS Tax78 has some counter scripts and many more.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 10th Mar 2013 03:44 Edited at: 10th Mar 2013 20:04
Quote: "Script by Conjured Entertainment"

v109 the intro to FPI variables ... back in the day...
lol

The variable system has changed a little since then.
Try this
  for a destroy script that will increment a kill count variable.

Then you will need an entity to run the counter and do its thing accordingly, which could be something like this
  for declaring the variable, setting its initial value, then checking its value to work your magic when it gets to your desired number. (in this case 3)
Of course, in this example, you would need a WinZone placed in your map.
The entity running the counter script would need to be invulnerable (health=0), be immobile, and have its Always Active? set to YES.
Having it always active ensures that the script will be running its check no matter how far away the player is from the entity.
We wouldn't want to declare the variable in the destroy script, because we only need to do it once, not every time we get a kill.

For your needs, we might increment the count by 10 or 25 or whatever score you want that entity to give for destroying it.
Separate destroy scripts could be made for many values.
Then, your entity script might display the value rather than using the winzone as in my example.
I'll leave all that coding for your modificatoions of the scripts.

I hope this helps

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 10th Mar 2013 06:20
Conjured is da man for scripting.

THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why. For me, theory and practice are combined: nothing works and I don't know why.
Tomahawk
11
Years of Service
User Offline
Joined: 16th Dec 2012
Location: Where do you think I live?
Posted: 10th Mar 2013 15:10
Can we use this script for commercial use Conjured?
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 10th Mar 2013 18:40 Edited at: 10th Mar 2013 20:03
Quote: "Conjured is da man for scripting."


Ok Flatlander, you talked me into it.

Here is the
  to display a score.
And
Here is a +10 points destroy

And
Here is a +25 points destroy

So,
There are the basic scripts for an example of a scoring system.
This example is intended for characters, so you will need to edit the destroy scripts to use...

:state=1:destroy

... for non-character entities.

Quote: "Can we use this script for commercial use Conjured?"

Anything I release is for commercial and/or personal use. (use it how you want)

Tomahawk
11
Years of Service
User Offline
Joined: 16th Dec 2012
Location: Where do you think I live?
Posted: 10th Mar 2013 21:59
Ok Conjured thanks for the response. The first script you posted, Is that a counter for each life or does the counter stay with the same amount of kills each time you respawn.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Mar 2013 00:23 Edited at: 11th Mar 2013 00:34
Quote: "The first script you posted, Is that a counter for each life or does the counter stay with the same amount of kills each time you respawn. "

The variable should hold its value for the life of the level.
You would need to allow for score resets each level.
Unless there was a change in an update that I missed.
I have been away from FPSC fpr awhile, so I missed a bunch of updates to the engine and the latest fpi changes.
If you want to reset the value in the level then just use the setvar action again.

Tomahawk
11
Years of Service
User Offline
Joined: 16th Dec 2012
Location: Where do you think I live?
Posted: 11th Mar 2013 00:42 Edited at: 11th Mar 2013 00:42
Thanks Conjured
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 11th Mar 2013 01:15 Edited at: 11th Mar 2013 01:16
Thank You Conjured Entertainment
I used your older version some time ago and made a pretty good bodycount style hud display with counter. The variables hold through all levels and continue to add until reset.(game end or restart)

It has been great at making quick shot'em up games.
Thanks again
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Mar 2013 23:09 Edited at: 11th Mar 2013 23:15
Quote: "Thanks Conjured"

Glad I could help.
I hope jrzombie can get some use out of it too.

Quote: "The variables hold through all levels and continue to add until reset"

Awesome!
Thanks for updating me about the update.
That changes alot of things now we can pass a variable value through levels.
I've been away too long, and I am really glad to be back.
FPSC is so awesome now. (THANKS LEE!)

The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 2nd Apr 2013 07:50
Hey, I hope Conjured sees this, how would you reset the kill count for each level? I'm sure it's an easy task, I just can't seem to come up with it.

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 2nd Apr 2013 16:16 Edited at: 2nd Apr 2013 16:17
@ The Master D
In the "loadingpage.fpi" for that particular level you would insert something like this...

The "setvar=xxx 0" resets it back to zero.

Almost forgot, you can use triggers also for a reset.
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 2nd Apr 2013 17:37
Okay, I'll probably just throw that in a trigger zone. I do have to ask this though, do I need it set up that the player walks through the zone in order for this script to work or can I just put the trigger zone outside of the map to run automatically?

Also, I'm working on re-writing these scoring scripts for my own uses and when I use the "dimvar" command and check syntax in FPI EditPad, it senses that this is an invalid command. Is that because it has yet to be added into the program diction or is this command for use with a mod?

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 2nd Apr 2013 18:19 Edited at: 2nd Apr 2013 18:20
If you write it like this:
:state=0:dimvar=killcount,setvar=killcount 0,state=1
you needn´t go through the zone.
If you write it so:
:state=0:dimvar=killcount,state=1
:state=1,plrwithinzone=1:setvar=killcount 0,state=1
then you must go through the zone

Also try my fpiEditPad command update, there are all commands from 1.2 downward

[href]forumfiles.thegamecreators.com/download/2436675[/href]

For new updates in futur look at the last page of fpi pad thread sometimes.

Corno_1


ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 2nd Apr 2013 18:29
@ The Master D
All methods work depending on your scripts. A trigger placed right where the player starts is easiest to do. Something like..

Not tested, but if this works you can place these anywhere in your levels.

Login to post a reply

Server time is: 2024-11-23 16:39:37
Your offset time is: 2024-11-23 16:39:37