Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, alibaba), 1,184 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
inkey(String*); questions.... #307246
01/28/10 04:08
01/28/10 04:08
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
I have two questions that seem to not have been asked yet and they address some issues with inkey.

Why does inkey stop mouse clicks? you'd think that you'd have the chance to click somewhere to stop the inkey like if you made a textbox, and wanted to click out of it to stop inkey or to go to a different textbox.

also why does your function freeze completely not allowing you to modify the inkey at all for instance, im making an morpg. when the player logs in he needs to type in his password, but I cant modify the text.pstring to change it to *'s while inkey is going, where i could just freeze it myself in a loop with another function to stop the inkey. that way I can make it a little more functional since I may have to find a different solution for my text boxes, soley because of this issue.

Re: inkey(String*); questions.... [Re: lostclimate] #307251
01/28/10 07:07
01/28/10 07:07
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Well at least changing text to stars is easy - use a font consisting of stars only.

Re: inkey(String*); questions.... [Re: FBL] #307254
01/28/10 08:38
01/28/10 08:38
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
with truetype font? making charmap for that would be a pretty glaring workaround. It would work tho........

Re: inkey(String*); questions.... [Re: lostclimate] #307256
01/28/10 08:48
01/28/10 08:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Lite-C is a programming language. So, it's completely up to you how inkey reacts on mouse clicks, or how the entered text is displayed as "*". Just program it in a function that runs while inkey is active. You need no special font, you can just display a different string.


Re: inkey(String*); questions.... [Re: jcl] #307258
01/28/10 08:59
01/28/10 08:59
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
yes, but inkey freezes its current function, so how ame i suposed to modify any string while people are typing.

Last edited by lostclimate; 01/28/10 08:59. Reason: typo
Re: inkey(String*); questions.... [Re: lostclimate] #307260
01/28/10 09:14
01/28/10 09:14
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
just do it in some other function.

Re: inkey(String*); questions.... [Re: Joey] #307265
01/28/10 09:49
01/28/10 09:49
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Code:
var inkeyStore = inkey(tempStr);
while(inkey_active) { // do stuff in here...
   wait(1); 
}



That'll work...
to make *'s out of your field, there's a easy workaround for that I did ages ago.
Read the str_len of the inkey string you pass, and display a 2nd string, created out of *'s, based on the length of the input string...
I'f im unclear with that idea, lemme know, i'll paste my code I made for you laugh

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: inkey(String*); questions.... [Re: Helghast] #307267
01/28/10 09:55
01/28/10 09:55
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
thank you so much Helghast. who'da thought the most annoying part of programming an mmorpg (or just a morpg for that matter) would be the string manipulation. I have anet and GSTsqlite integrated, up and running where clients log on and chat, and so far 90% of my issues were related to string manipulation and being able to tell what was a pointer, char array, or whether or not it was global... frown

Re: inkey(String*); questions.... [Re: lostclimate] #307269
01/28/10 10:07
01/28/10 10:07
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
I disagree, once familiar with the string manipulation functions, these are the most powerfull tools you'll get in scripting.

again, if you need help, lemme know, i've quite alot of string manipulation experience (been doing that since early A6... lol)

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: inkey(String*); questions.... [Re: Helghast] #307270
01/28/10 10:18
01/28/10 10:18
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline OP
Expert
lostclimate  Offline OP
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
while i agree that its powerful (basically can be used to send data of any type) it still frustrates me because its hard to figure out which is needed, string, char array, or string pointer.

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | 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