This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-28 07:08:40

Pinkamenapie
New Scratcher
Registered: 2012-04-25
Posts: 1

Name genertor help!

I am planning on making a name generator but i have no clue how to...Somebody please help me!!

Offline

 

#2 2012-04-28 10:16:59

PhirripSyrrip
Scratcher
Registered: 2012-02-11
Posts: 100+

Re: Name genertor help!

What do you mean, "name generator"?


http://i46.tinypic.com/ao03lk.png

Offline

 

#3 2012-04-28 10:46:59

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: Name genertor help!

Do you mean that you want something to choose a random name? If you wanted to do that, you would have to make a List. Then, you would have to add a bunch of random names to it, which would not be very fun, like this:

Add [Bob] to [names v]
Add [Bill] to [names v]
Add [Sally] to [names v] //And repeat
And you would have to keep repeating that until you thought that you had enough names. After that, if you wanted to generate a name, you would do this:
Set [generated name v] to ( item (any v) of (names v))
After that, you would have generated a random name, but having to enter a ton of names would take a long time.

I hope that this helped, but I don't really know what you are asking for


La La
I wrote an album.

Offline

 

#4 2012-04-28 11:05:04

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Name genertor help!

^that

If you wanted a random amount of letters in a random order you could use this:

when gf clicked
set (lettercount) to (pick random 3 to 10)
repeat (lettercount)
add ((any v) of [alphabet v]) to [name v]
end
say (name)


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#5 2012-04-28 11:08:10

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Name genertor help!

You would need a list called alphabet with a-z in it


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#6 2012-04-28 11:09:44

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: Name genertor help!

zammer990 wrote:

^that

If you wanted a random amount of letters in a random order you could use this:

when gf clicked
set (lettercount) to (pick random 3 to 10)
repeat (lettercount)
add ((any v) of [alphabet v]) to [name v]
end
say (name)

If you did that, couldn't you end up with strange names like this?:
ahefy
pdyght
vrhief
aserdui

They wouldn't even be names

Last edited by AgentRoop (2012-04-28 11:10:03)


La La
I wrote an album.

Offline

 

#7 2012-04-28 11:15:34

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: Name genertor help!

If you mean what I think you do, I'd start by making two or more lists and filling them with names, or name parts. You just do that manually, ahead of time.
For example:
FirstName list
"Jack "
"Roy "
"Sam "
(Notice how I put spaces after these.)

LastName list
"Smith"
"Jones"
"Doe"

Then whenever you need a name, your script would look something like this:

set Name to (Item (Any v) of [FirstName v])
set Name to (Join (Name) (Item (Any v) of [LastName v]))
say (Name)
And it would say something like "Roy Smith".

Last edited by ManaUser (2012-04-28 11:24:25)


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#8 2012-04-28 11:17:00

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: Name genertor help!

ManaUser wrote:

If you mean what I think you do, I'd start by making two or more lists and filling them with names, or name parts. You just do that manually, ahead of time.
For example:
FirstName list
"Bob "
"Roy "
"Sam "
(Notice how I put spaces after these.

LastName list
"Smith"
"Jones"
"Doe"

Then whenever you need a name, your script would look something like this:

set [Name v] to (Item (Any v) of [FirstName v])
set [Name v] to (Join (Name) (Item (Any v) of [LastName v]))
say (Name)
And it would say something like "Roy Smith".

I fixed it a little bit. This looks like the best shot at generating names.


La La
I wrote an album.

Offline

 

#9 2012-04-28 11:24:31

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: Name genertor help!

Then, if you want it to make up completely new names, but still have them be pronounceable and look like names, you'll have to make them out of parts. For example:

FirstNamePart1 list
"Kar"
"Jon"
"Benn"
(Notice how I capitalize only the first part.)

FirstNamePart2 list
"son "
"ington "
"field "
(Notice how I only put spaces after the last part.)

So then you'd get names like "Jonfield" and "Bennington", which are a bit weird, but they do sound like names.

Oh yeah, and of course you'll need extra lists if you want to be generate female-sounding first names too.

Last edited by ManaUser (2012-04-28 11:27:32)


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#10 2012-04-28 11:25:54

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: Name genertor help!

ManaUser wrote:

Then, if you want it to make up completely new names, but still have them be pronounceable and look like names, you'll have to make them out of parts. For example:

FirstNamePart1 list
"Kar"
"Jon"
"Benn"
(Notice how I capitalize only the first part.)

FirstNamePart2 list
"son "
"ington "
"field "
(Notice how I only put spaces after the last part.)

So then you'd get names like "Jonfield" and "Bennington", which are a bit weird, but they do sound like names.

That's a cool idea! That way, the name-making will be more efficent!

Last edited by AgentRoop (2012-04-28 11:26:04)


La La
I wrote an album.

Offline

 

Board footer