Random Name Generator/Array Help?

For questions about using Classic.

Post » Thu Mar 24, 2011 7:34 pm

Hi,
I am trying to use Construct to build a name generator.

I have worked through the tutorials I have found without many issues and have searched through the forums for information.

I want the basic functionality to be something like.

> User presses a button

> First name is picked at random from a pre-defined list of names (around 40 different ones)
> Surname is picked at random from a pre-defined list of names

The freshly chosen Firstname and Surname appear until the button is pressed again, or level is reset.

I have been blundering around trying to get a generated random number to choose the correlating random name but I can't see how/where you would put this data in an array(?).

Can anyone help me in the right direction?

Thanks :idea: :D
B
1
G
1
Posts: 2
Reputation: 429

Post » Thu Mar 24, 2011 7:50 pm

Whipped this up in a few minutes.

Random Two-Name Generator

Press Space to generate names.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Thu Mar 24, 2011 7:59 pm

Tokinsom beat me to it, but here's another example:
[url:18zkiuox]http://dl.dropbox.com/u/5426011/examples4/randomname.cap[/url:18zkiuox] made in 0.99.97
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Thu Mar 24, 2011 8:07 pm

you amazing people
B
1
G
1
Posts: 2
Reputation: 429


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests