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 / Something like achievement system

Author
Message
Beno09
13
Years of Service
User Offline
Joined: 3rd Jun 2011
Location: Bosnia and Herzegovina
Posted: 30th Oct 2011 19:22
Hello guys!

I have one question. How can I create something like getting points when you found some specified items and if you found every item, you get on screen message that you found every item ? I hope you get this because English is not my native language
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 30th Oct 2011 19:32 Edited at: 30th Oct 2011 19:34
You can script it in vanilla FPSC using the variable system that is available. When item(s) are found and collected, you adjust the variable you would assign accordingly. We use this method currently; it is a lot of work and you need to understand scripting/track your assigned variables very closely. As an example, you have an item that gets collected, and it has a variable assigned to that script. When the item is picked up, the variable value is assigned to what you specify and a hud is displayed.

Another method is to use RPG Mod. If I recall (unless it has changed), it has the ability to do this as well. I'm certain Ched80 can confirm that. Regardless, you have to know your scripting very well.


Twitter: @NFoxMedia
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 30th Oct 2011 22:11
Aye - RPGmod has an inventory system build in that keeps track of all items collected, but this too requires some effort. If you're new to FPSC I'd suggest trying to script it using v118's variables. RPGmod is good, but can be quite daunting to set up for those who are new to FPSC's scripting language.

Beno09
13
Years of Service
User Offline
Joined: 3rd Jun 2011
Location: Bosnia and Herzegovina
Posted: 31st Oct 2011 21:20
And that is main problem. I am bad at scripting and I never worked on scripts. If someone maybe have scripts that are like this that I mention please share it with us. Please guys I really need this
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 31st Oct 2011 22:37 Edited at: 31st Oct 2011 23:49
best and most simple to use a variation of conjured-entertainment´s cash-system (as so many times before^^):
http://forum.thegamecreators.com/?m=forum_view&t=130281&b=24

i altered it for you:

1) set this as a mainscript for a nonstatic entity anywhere on your map, and set the entity to "always active" and "isimobile= 1/yes" with right clicking.



now the only thing you need to do is alter your item-destroyscripts(copy&paste original destroyscripts):
insert this little snippet into the first line of the script, right below ";triggers"

(if this doesnt work on itempickup because they dont use there destroyscripts, you have to insert "addvar=points 1,", right before "playertake"-action, into the mainscript of the item (setup a copy of the script so you dont touch the original)).

finally you have to build 2 huds. i cant do it atm because i have no painting-prog on this computer.
one for the labeling "points", simply alter the "cash.dds" out of the link-download above and save-as "points.dds" in the folder "gamecore\huds\user\".
second is the display you want to use when all points are collected. name it "allpoints.dds" and save in "gamecore\huds\user\".

the above script sets up a variable called "points" and displays it under the "pointslabel"-hud. with each collected item, its destroyscript rises the counter by 1. when it counts 5 (":state=1,varequal=points 5:", edit number as you wish), the "allpoints"-hud is displayed in the middle of the screen, fades out and the counter is reset to 0.

didnt test it, but should work. i hope you understand and can build the huds.you can use this system with all kinds of entities like items, destroying specific enemies etc. conjured has delivered great basic work with his cash-system.

EDIT: point.dds and allpoints.dds hud-images attached. found gimp on this thing called computer^^

cheers

maho

Attachments

Login to view attachments
Beno09
13
Years of Service
User Offline
Joined: 3rd Jun 2011
Location: Bosnia and Herzegovina
Posted: 1st Nov 2011 00:49
Thanks @maho76 you are my man, thanks again. But I have only one problem and I do not understand this : I can not pickup entity and I know that this I must do
Quote: "(if this doesnt work on itempickup because they dont use there destroyscripts, you have to insert "addvar=points 1,", right before "playertake"-action, into the mainscript of the item (setup a copy of the script so you dont touch the original))."
but I do not understand this, where is "playertake" action on the mainscript ?
Everything else works like a charm only on this part I have problem.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 1st Nov 2011 12:09 Edited at: 1st Nov 2011 12:25
do the points change in number but you cannot pick it up? then i think you use the wrong script.
or nothing is happen at all, even no change in the pointshud?

show us the mainscript of your item when you use the stockscript (pickupobject.fpi or something like this, i am at work so i cannot look myself).

EDIT: this is the edited pickupscript out of conjured´s system, yours should be similar:



try this as the main itemscript and use standard destroyscript. should work.
Beno09
13
Years of Service
User Offline
Joined: 3rd Jun 2011
Location: Bosnia and Herzegovina
Posted: 1st Nov 2011 13:13
I will first answer what happens with old scripts that you gave me. It shows hud but I can not pickup item and no points are added also.

And for this new script. Now I can pickup object and I hear sound but there is no hud anymore. Sorry if I am boring and thanks for your help.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 1st Nov 2011 13:52 Edited at: 1st Nov 2011 13:55
yes, i deleted the hudmake-line and hudshow because of the paths (i dont know wich hud-dds you want to use),sorry.^^



code with the hud included, but you have to change the hudname/path into the needed (gamecore/text/.../.dds, look at your original script and change it).

do the points change when grab the item so system works?
Beno09
13
Years of Service
User Offline
Joined: 3rd Jun 2011
Location: Bosnia and Herzegovina
Posted: 11th Dec 2011 14:12
Am I stuppid or what. I just can not get this working. Can you put the old hud in script, that hud that you gave me ? I can not find a way have to do this on my own. Thanks
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 12th Dec 2011 15:40 Edited at: 12th Dec 2011 15:41
give me a day or 2, i will setup a zip-package for you to get this working, beno. but you have to wait until i am back on my own machine, no fpsc on this thing here.
Beno09
13
Years of Service
User Offline
Joined: 3rd Jun 2011
Location: Bosnia and Herzegovina
Posted: 12th Dec 2011 22:45
No problem maho, whenever you finish it will be great Thank you
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 14th Dec 2011 14:20
Model pack 54 got an achievementsystem for vanilla FPSC

With some scriptingknowledge it would be possible to modify it in order to make it even cooler.

The achievements are brought cross-levels and after gathering a set ammount of "gamescore" you can unlock "cheats" etc.




- A secret signature -
Beno09
13
Years of Service
User Offline
Joined: 3rd Jun 2011
Location: Bosnia and Herzegovina
Posted: 24th Dec 2011 01:00
@Cyborg ART : the main problem is that I do not know anything from scripting. I will try to learn it in future.

Maho, did you finished what you promised ?
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 29th Dec 2011 21:31
i dont forget you, beno. just had to do some things on habitat.

http://forum.thegamecreators.com/?m=forum_view&t=192901&b=21

Hope its as you wished.

Login to post a reply

Server time is: 2024-11-24 02:00:33
Your offset time is: 2024-11-24 02:00:33