Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
read level-of-difficulty from standard input #220933
08/10/08 21:37
08/10/08 21:37
Joined: Jun 2008
Posts: 40
pfeldman Offline OP
Newbie
pfeldman  Offline OP
Newbie

Joined: Jun 2008
Posts: 40
I'd like to be able to read a level-of-difficulty (1-20) from the player. It seems as though file_var_read() could be used to do this if the user types the numerical value into a file, but this would be a rather ugly interface. Is there a simple mechanism for reading a numerical value from the keyboard?

Dr. Phillip M. Feldman

Re: read level-of-difficulty from standard input [Re: pfeldman] #220935
08/10/08 21:57
08/10/08 21:57
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
inkey()?
or key_0 ... key_9?

Last edited by Joozey; 08/10/08 21:58.

Click and join the 3dgs irc community!
Room: #3dgs
Re: read level-of-difficulty from standard input [Re: Joozey] #221451
08/14/08 03:35
08/14/08 03:35
Joined: Jun 2008
Posts: 40
pfeldman Offline OP
Newbie
pfeldman  Offline OP
Newbie

Joined: Jun 2008
Posts: 40
inkey() is perfect. I did not initially find this function because it is in the string manipulation section of the manual instead of the input/output section.

Thanks!

Phillip


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1