Posted By
|
Message
|
JP
Registered 07/06/2003
Points 1338
|
7th June, 2003 at 03:51:01 -
In the Games Factory they have text boxes that the user can put text in. Im creating a learning game where the kid puts his answer into the box and submits it, how do I do that?? I want it so when the question asks "Whats 3x3" and the kid puts in 8, he gets it wrong, but when he puts in "9" it goes to a different question.
Steve Zissou: Anne-Marie, do all the interns get Glocks?
Anne-Marie: No, they have to share one.
|
Shen Possibly Insane
Registered 14/05/2002
Points 3497
|
7th June, 2003 at 04:20:23 -
By using an Edit box and a Button. Use the events:
* Button pressed
+ Text of Edit box = '9'
- say 'That's Right'
* Button pressed
+ Text of Edit box <> '9'
- say 'That's Wrong. You will be sentenced to death by flogging'
You can compare the text of the edit box by Comparing 2 General Values (under the Special object)
gone fishin'
|
JP
Registered 07/06/2003
Points 1338
|
7th June, 2003 at 15:44:24 -
O wow thank you thank you thank you!
Steve Zissou: Anne-Marie, do all the interns get Glocks?
Anne-Marie: No, they have to share one.
|
JP
Registered 07/06/2003
Points 1338
|
7th June, 2003 at 16:07:59 -
Oh, never mind, I went to go and try what you said, and I don't know how! It says "Button Clicked" then I go to put the "Text = 9" and I dont know where to do it! The only options are about "Load text File" blah blah, and "have input focus".
I am really lost
Steve Zissou: Anne-Marie, do all the interns get Glocks?
Anne-Marie: No, they have to share one.
|
ShadowCaster Possibly Insane
Registered 02/01/2002
Points 2203
|
7th June, 2003 at 18:21:13 -
JP, you dont do it via the edit box's own conditions. The first icon, when you create a new condition, is called the "Special Conditions". Click this then select "Compare Two General Value".
A window that looks like the Expression Editor will open. Select the first button that says "Retrieve Data From Object" and select Get String under the edit box.
In the second box in the thing that looks like the expression editor, enter 9 and press OK.
Do the same thing for the next condition but select "Different" from the combo box where it says "Equal".
Mike
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
|
Weston L
Registered 16/12/2002
Points 1603
|
7th June, 2003 at 18:53:23 -
Thanks ShadowCaster. I was wondering the same thing.
n/a
|
RapidFlash Savior of the Universe
Registered 14/05/2002
Points 2712
|
7th June, 2003 at 23:10:23 -
If you don't want any interference from any other button/text objects do
Always ---> Edit Box -> Set Foucs On
But the rest of the people answered your question exactly.
http://www.klik-me.com
|
ShadowCaster Possibly Insane
Registered 02/01/2002
Points 2203
|
8th June, 2003 at 01:08:22 -
Ale: that's not a very good way of doing it. A better method would be:
+ (NOT) Edit box has input focus
- Set focus on
Mike
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
|
Weston L
Registered 16/12/2002
Points 1603
|
8th June, 2003 at 01:50:15 -
Do 'always' commands slow down the speed of the program?
n/a
|
ShadowCaster Possibly Insane
Registered 02/01/2002
Points 2203
|
8th June, 2003 at 03:07:55 -
Technically yes, although you may not notice in some applications.
Every event and action slows down the program to some extent.
Mike
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
|
RapidFlash Savior of the Universe
Registered 14/05/2002
Points 2712
|
8th June, 2003 at 14:08:25 -
If you already have an always command would it be better to do it my way (one less line of code)?
http://www.klik-me.com
|
ShadowCaster Possibly Insane
Registered 02/01/2002
Points 2203
|
8th June, 2003 at 18:28:25 -
Ale: It also means that the action is running every time the Always event executes, so it still wouldnt be as good as far as scalability is concerned.
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
|
Pyro
Registered 22/05/2003
Points 110
|
9th June, 2003 at 04:33:36 -
Every event slows it down? My first level has more than two thousand.... sheesh.
n/a
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
9th June, 2003 at 04:46:22 -
2000+! I mean, there must be easier ways.
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
|
Pyro
Registered 22/05/2003
Points 110
|
9th June, 2003 at 05:03:04 -
20% have to be always's, and rest were copied once for the second player option. I would submit a demo If my computer didn't have viruses out the yin yang.
n/a
|
|
|