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
1 registered members (TipmyPip), 18,513 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
inkey_active #204231
04/28/08 02:45
04/28/08 02:45
Joined: Aug 2007
Posts: 44
QLD, Australia
Serex Offline OP
Newbie
Serex  Offline OP
Newbie

Joined: Aug 2007
Posts: 44
QLD, Australia
So ive been playing around with inkey and for some reason the call isnt terminating when the user presses the enter key.

 Code:
if (!inkey_active)
{
  result = inkey(sPlayerName); // wait until [enter] pressed
			
  if (result == 13) 
  {
    iSetName 	= 0;
    iPlayGame 	= 1;
  }
}


I have seen that inkey_active would have been what i was after, but haven't really worked out how to use it with lite-c. The above is what i have so far

Re: inkey_active [Re: Serex] #204296
04/28/08 15:11
04/28/08 15:11
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
I think you dont need to set result = inkey(sPlayerName);...instead,just type
inkey(sPlayerName);..the reason is that result is automatically set.


I like good 'views' because they have no 'strings' attached..
Re: inkey_active [Re: Serex] #204306
04/28/08 16:33
04/28/08 16:33
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can do this even easier:
 Code:
if (!inkey_active)
{
  if (inkey(sPlayerName) == 13) 
  {
    beep; // So you can see if enter is terminating...
    iSetName 	= 0;
    iPlayGame 	= 1;
  }
}
Other than that I don't see no reason why this shouldn't work...


Always learn from history, to be sure you make the same mistakes again...
Re: inkey_active [Re: Uhrwerk] #204308
04/28/08 16:43
04/28/08 16:43
Joined: Aug 2007
Posts: 44
QLD, Australia
Serex Offline OP
Newbie
Serex  Offline OP
Newbie

Joined: Aug 2007
Posts: 44
QLD, Australia
yeah its not even beeping, 2.43am now, will look at it in the morning... thanks


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