Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (bigsmack), 5,135 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
getting keystrokes in a string #237869
11/23/08 01:50
11/23/08 01:50
Joined: Sep 2005
Posts: 75
CA, Orange County
Gerrit Offline OP
Junior Member
Gerrit  Offline OP
Junior Member

Joined: Sep 2005
Posts: 75
CA, Orange County
Hi,
I would like to have the player enter his (her) name in a string. I am trying to use inkey(plyername) but I move the player with the arrow up, arrow down etc and these arrows abort inkey.
Are there other ways to allow the player to enter info?
Thanks
Gerrit
PS. I did define playername as a string. So no problem there

Re: getting keystrokes in a string [Re: Gerrit] #237881
11/23/08 04:58
11/23/08 04:58
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
You can use the inkey_active command to see if the player is trying to input commands and then use inkey_active to disable player movement while the player is typing.


I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: getting keystrokes in a string [Re: heinekenbottle] #237921
11/23/08 17:30
11/23/08 17:30
Joined: Sep 2005
Posts: 75
CA, Orange County
Gerrit Offline OP
Junior Member
Gerrit  Offline OP
Junior Member

Joined: Sep 2005
Posts: 75
CA, Orange County
I can indeed use inkey_active to verify that the player is entering text but can I somehow disable the cursur keys? Even if I dissable player movement the player can still hit the cursor keys and abort the inkey process.

Re: getting keystrokes in a string [Re: Gerrit] #238385
11/27/08 00:07
11/27/08 00:07
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
just reenable it if a cursor key is pressed

Re: getting keystrokes in a string [Re: MrGuest] #238417
11/27/08 04:30
11/27/08 04:30
Joined: Sep 2005
Posts: 75
CA, Orange County
Gerrit Offline OP
Junior Member
Gerrit  Offline OP
Junior Member

Joined: Sep 2005
Posts: 75
CA, Orange County
Thanks I solved the problem just like you suggested. Put the inkey in a do loop until the player hits the enter key or the tab key

Best regards
Gerrit


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