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.

Author
Message
Hepy
20
Years of Service
User Offline
Joined: 16th Apr 2004
Location: United Kingdom
Posted: 19th Jun 2004 21:15
How can you make what you type appear on screen.
Thanks,
Hepy

Hepy
comando 300
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 19th Jun 2004 21:47 Edited at: 19th Jun 2004 21:49
You can make some code for that, the easy one is

start:
cls
input "Type:";a$
if a$<>"":print "You typed:";a$:endif
if a$="":print "You didn't typed":endif
wait 1000
goto start




CURRENT PROJECT: RETRO PAC-MAN
Raithe
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 19th Jun 2004 21:50 Edited at: 19th Jun 2004 21:51
Umm... im guessing this is what you want....
Input""
Or What he said..

~Ellusion Games~
xXxLife is like a box of chocalate's there's always one's you dont likexXx
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 19th Jun 2004 22:22
It would help if you can post more speecifically what you are looking for. It's possible that the input method above may not be what you need. The reason is that it pauses the program waiting for a key press. Although depending on your situation this may be all that you need.

Although it's slightly more complex, it would be more flexible to have a routine that checks for input in a game loop. Stores the keys in an input buffer(as to not miss any keys) and displays them. This way other things can be processed and the program doesn't stop for every key press. Say for example, you want to later use the code in a game. Other events may need to happen while waiting for key presses.

Let us know, and if this is what you need we can provide some snippets for you.


Hepy
20
Years of Service
User Offline
Joined: 16th Apr 2004
Location: United Kingdom
Posted: 20th Jun 2004 22:22 Edited at: 20th Jun 2004 22:23
Hey, sorry for not being more speicfic, the input command was all i was aiming for, but the more complex one looks good for game use,
thanks alot,
Hepy

Hepy

Login to post a reply

Server time is: 2024-09-22 14:18:17
Your offset time is: 2024-09-22 14:18:17