getting keystrokes in a string

Posted By: Gerrit

getting keystrokes in a string - 11/23/08 01:50

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
Posted By: heinekenbottle

Re: getting keystrokes in a string - 11/23/08 04:58

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.
Posted By: Gerrit

Re: getting keystrokes in a string - 11/23/08 17:30

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.
Posted By: MrGuest

Re: getting keystrokes in a string - 11/27/08 00:07

just reenable it if a cursor key is pressed
Posted By: Gerrit

Re: getting keystrokes in a string - 11/27/08 04:30

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
© 2023 lite-C Forums