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! / Love Meter Program

Author
Message
Duderiza
20
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 18th Jan 2004 18:34
Hi Guys. This is going to be a lenthy piece of writing. I am making a love meter program, there are loads on the internet, but i decided to make my own. I want a certain letter to be worth so many points. I am not using input command as the text font is not too good. Instead i use this command to display a letter:

If inkey$()="a"
paste image 1,0,0
inc x,40
wait 60
endif

This is okay so far, if the "a" key is pressed then my small bitmap image is displayed, then if I press "n" key, a small bitmap image is displayed 40 pixels to the right of the previous letter. Now i want each bitmap to be worth a certain amount of points. I can do this. But if a user wants to delete a letter, then they have to press the "delete key". A black tile bitmap is then placed on screen removing the previous letter, by using "dec x,40" command. How would i get a command to delete the points for that letter from the total points. If they make a mistake in typing their name in the love meter, they will press the delete key then press the the letter they want, and it will be counting more points than it should, and i dont want it to do that.

I hope someone knows wot im talking about, and can understand this, and any help would be nice, and i would be grateful.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 19th Jan 2004 11:11 Edited at: 19th Jan 2004 11:16
Something like this I think.....

Dim Score(10) Or however many letters you want to allow.
s = 1
Do


If inkey$()="a"
paste image 1,0,0
inc x,40
wait 60
Score(s) = Score(s) + 10
Inc S
endif

Rem If the user presses the delete key
Rem Put your code here, then.....

is s > 0 then Dec s
Score(s) = 0


That's the rough idea..

Pincho.

Login to post a reply

Server time is: 2024-05-11 14:59:49
Your offset time is: 2024-05-11 14:59:49