Random Text

Get help using Construct 2

Post » Sun Jun 16, 2013 7:37 pm

I am trying to create a game that on start up generates random words on the screen. You can then click on the random words and it adds the word to a text box. How would I create the random words and would I use a button or text object to show the words? Also what would I use to store the words in a database (so they can be randomized) an Array, Dictionary, or XML file?

Thank You
InsertCoin25
B
4
G
1
Posts: 17
Reputation: 530

Post » Mon Jun 17, 2013 12:26 am

Still newbie with C2, but came up with something that might help you out, at least until someone smarter comes and replies to this topic :)

Example demo: http://mythargia.com/dev/rand/


CoffeeOD2013-06-17 00:28:28
B
7
S
1
Posts: 51
Reputation: 1,087

Post » Mon Jun 17, 2013 4:44 am

That is some of the procedure I was looking for. The only thing really missing is being able to click on the text with the mouse so it inserts it into the text box, instead of randomly appearing there. I appreciate this greatly as it is a great start for me. Just need the words on the scene so I can click on them.

Thank You
InsertCoin25
B
4
G
1
Posts: 17
Reputation: 530

Post » Mon Jun 17, 2013 12:39 pm

Example demo: http://mythargia.com/dev/rand2/



Capx: http://mythargia.com/dev/rand2/rand.capx (134)
CoffeeOD2013-06-17 12:41:43
B
7
S
1
Posts: 51
Reputation: 1,087

Post » Mon Jun 17, 2013 2:10 pm

That is it!! Just one more request and it will be perfect. Is there a way to have the words appear in different text (like a row of text) and it only randomizes them once, instead of cycling through the text on start up? For example you have a row of blank text fields and on start up each text field is randomized with one word (then it stops randomizing), then you get to click on them to add them to the text box. Thank you CoffeeOD so much for helping me with this. I do greatly appreciate your work.

InsertCoin25
B
4
G
1
Posts: 17
Reputation: 530

Post » Mon Jun 17, 2013 5:57 pm

Note: Remove that empty "every tick", forgot to remove it. This is pretty basic example, change "Text.PickedCount > 6" to increase/decrease amount max. words per run.

Example demo: http://mythargia.com/dev/rand4/



Capx: http://mythargia.com/dev/rand4/rand.capx (134)
CoffeeOD2013-06-17 18:00:29
B
7
S
1
Posts: 51
Reputation: 1,087

Post » Mon Jun 17, 2013 10:22 pm

This is perfect CoffeeOD!!! I had another idea for this example. What if the text were to instantly appear on start up with a column of 10 and a row of 10 text words? Also what if the text is clicked and entered into the text box how would you check to see if that sentence or word is correct? For example I click on eee then fff and it looks like this in the text box: eee fff. I want to be able to push a button and check a database to see if that is a sentence in the database. This is amazing and quick fast prototype you put together CoffeeOD. Very impressed, thank you again.

InsertCoin25
B
4
G
1
Posts: 17
Reputation: 530

Post » Mon Jun 17, 2013 11:28 pm

B
7
S
1
Posts: 51
Reputation: 1,087

Post » Mon Jun 17, 2013 11:31 pm

B
7
S
1
Posts: 51
Reputation: 1,087

Post » Tue Jun 18, 2013 12:25 am

Works great, only problem is that bbb ggg says computer says no and hhh doesn't pop up in the random letters. Great work though. This is going to work perfect for my needs. Will mess with the file more tonight. Thanks again.

InsertCoin25
B
4
G
1
Posts: 17
Reputation: 530

Next

Return to How do I....?

Who is online

Users browsing this forum: celstrider, LukeNecklace and 12 guests