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 / Load Save Variables with Save Game?

Author
Message
Tobias_Ripper
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: REPCONN inc.
Posted: 28th Jun 2013 20:34 Edited at: 28th Jun 2013 20:40
So essentially I have a scene with three rooms. Each room has 2 buttons, the buttons are numbered Button#1 and Button#2. I need the player to choose one of the two buttons (upon the pressing of which a +1 will be added to the representing variables - Button#1=N and Button#2=N)and then when he goes through all 3 rooms, proceed into the next level. In the next level I need the game to take a look if player pressed Button#1 or Button #2 more and then pefrorm an action accordingly like:

If Button#1>Button#2 ...
else if Button#1<Button#2...

This will be a simple matter of comparing 2 variables as each button pressed will simply add + 1 to Button#1 or Button#2 variables.


All I need to to know is how can I save and access variables throughout the game?
PS: Keeing in mind that at any point the player can start the game all over again and the game should NOT* have access to the variables from the past Playthrough.

Isenstadt Studio: http://isenstadtstudio.com/
Composers Page: Milesthatch.com
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th Jun 2013 04:10
Hi Tobias_Ripper
BlackFox has some good info on his thread here...http://forum.thegamecreators.com/?m=forum_view&t=192148&b=23
I did something similar awhile back with a "body counter" using variables. As for resetting when you start over, BlackFox had some good pointers. Read the second posts down here..http://forum.thegamecreators.com/?m=forum_view&b=23&t=192148&p=1
I reset my "variables" in the "loadingpage.fpi" with this
Very easy.
A trigger can also be used.
best

Login to post a reply

Server time is: 2024-04-26 16:45:51
Your offset time is: 2024-04-26 16:45:51