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.

2D All the way! / need help. get a certain point in a game, and save it to an array

Author
Message
Duderiza
20
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 31st Aug 2003 21:47
Its regarding the 2D gambling game, if you have seen the gambling game. Say if you were up to $60,000 dollars on it, how would you record that value. I want to record the cash at its highest point in every game. Then I want to save it to a file. I think i know how to export it to a file and encrypt it. The main point would be for the program to record the highest point of score in a game.

I hope somebody knows what im on about.
Thanx in advance for all your help
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 1st Sep 2003 11:04 Edited at: 1st Sep 2003 11:06
get a variable called highscore and one called score
highscore=0
score=0

as the game is played increase the score variable as they get money/points

when they win/lose check to see if the score is higher than highscore, if it is the highscore=score,

if gameover=1
if score>highscore then highscore=score
endif

then just write the highscore value to a file and encrypt it, but remember to load it into the highscore variable next time the game is played


Duderiza
20
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 1st Sep 2003 17:09
Cheers ReD_eYe. That'll do nicely.

Login to post a reply

Server time is: 2024-04-25 16:31:12
Your offset time is: 2024-04-25 16:31:12