The Daily Click ::. Forums ::. Klik Coding Help ::. If TEXT =
 

Post Reply  Post Oekaki 
 

Posted By Message

Rycon



Registered
  20/09/2002
Points
  996
22nd September, 2003 at 20:44:04 -

I have a edit box, where the player can enter in somthing. I would like to know how to retrive what they typed in once they hit enter. So say they typed in, HI. If text = "Hi" then...

Im sure this is probly simple, I cant seem to figure it out.

 
We are the music makers, we are the dreamers of dreams...

Mr Coffee



Registered
  04/09/2003
Points
  440
22nd September, 2003 at 21:43:42 -

You could save the text out as a file (with the name of the file being the text in the edit box) into your games directory and then you use the search object to search your games directory for the file name.

 
99 percent chance that the above post is 100 percent correct.

Rycon



Registered
  20/09/2002
Points
  996
22nd September, 2003 at 21:48:44 -

Hmm, I think its very sad how retrieving text is so hard, I think its pathetic on Clickteams part. How the heck are you suppost to make a text based game, like the good ol ones where you TYPE to do stuff, like PICK UP STICK.

 
We are the music makers, we are the dreamers of dreams...

Rhys D

Please enter a custom rating

Registered
  02/01/2002
Points
  162

Has Donated, Thank You!VIP MemberIt's-a me, Mario!Wii OwnerMushroomStrawberrySweetieCardboard BoxOrangeAttention Getter
I am an April Fool
22nd September, 2003 at 23:18:53 -

use the 'compare two general variables' event. then just say, if "text in textbox1" equals "Hi" then add your actions. find the event under the special events i think.

 
http://www.rhysd.com

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
23rd September, 2003 at 03:39:31 -

I think it's case sensitive though

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
23rd September, 2003 at 03:41:16 -

I think that Mr Coffee must think you're talking about something else - Gimley's method above will work. The "get text" does exist, it's just not where you would expect to find it.

Actually, don't ignore the "Compare two general values" event, it's useful for a lot of things. For instance, rather than using "Compare counter to a value" you can use it instead.

 
http://www.davidn.co.nr - Games, music, living in America

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
23rd September, 2003 at 03:43:37 -

By the way, to get rid of the case sensitivity in MMFusion you can convert the string to capitals. Use something like Caps$(Gettext$("Edit Object")) = "HELLO". (NB That's probably not the formula, I'm just making this up.)

 
http://www.davidn.co.nr - Games, music, living in America

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
23rd September, 2003 at 07:41:47 -

Use string parser for capitalisation.

 
gone fishin'

Rycon



Registered
  20/09/2002
Points
  996
23rd September, 2003 at 10:50:35 -

Sweet victory...

Thanx guys for the wonderfull help, I was about to change everything to counters.

Oh and sorry about the clickteam comment, should of waited a little longer.

Has anybody attempted a good ol fashioned Text game? Im trying to remember the names of those old PC games, I think one was called Haunted House or somthing. Oh and Police Quest. Good times good times.

 
We are the music makers, we are the dreamers of dreams...

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
23rd September, 2003 at 15:00:35 -

"Hmm, I think its very sad how retrieving text is so hard, I think its pathetic on Clickteams part"

If you've ever done strings in C\C++ you'd understand why it's hard. actually, it's about 1,000 times easier in mmf



Image Edited by the Author.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Mr Coffee



Registered
  04/09/2003
Points
  440
23rd September, 2003 at 17:14:39 -

No, I understood the question. Using compare two general values will also work, but it won't work quite as well. For example, with my method if you say "hi, how are you doing" it will detect the "hi" but the compare two general values method will not.

 
99 percent chance that the above post is 100 percent correct.

Rycon



Registered
  20/09/2002
Points
  996
24th September, 2003 at 18:00:57 -

Well Kris, I used to program Qbasic, and it was rather easy to compare text. I dont know that much about C++ programming.

 
We are the music makers, we are the dreamers of dreams...

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
24th September, 2003 at 20:28:12 -

Tigs made a good textbased game. He also made a text adventure creator. It's all on his site.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
25th September, 2003 at 08:59:17 -

Put it this way: C++ strings are actually ARRAYS. Have fun resizing them.

Tigs made his textbased game with the text adventure creator. http://www.gullen.pwp.blueyonder.co.uk/software.html

 
n/a
   

Post Reply



 



Advertisement

Worth A Click