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

#1 2012-11-28 10:16:06

srowe1
New Scratcher
Registered: 2012-11-28
Posts: 3

Adding a players name to a game

Does anyone know how we can get a player to be able to add in their name? replies gratefully received.

Offline

 

#2 2012-11-28 13:08:41

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: Adding a players name to a game

The only way you can do this is by using the "ask" and "answer" blocks. Ask the players name, hopefully they'll be truthful and then you have their name saved in the "answer" variable  smile


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#3 2012-11-28 13:16:48

scratchyrocks
Scratcher
Registered: 2012-09-29
Posts: 19

Re: Adding a players name to a game

when i receive [name v]
ask [what is your name?] and wait
set [name v] to <answer>
say <join (hi,) <name>>
do whatever you want

Offline

 

#4 2012-11-28 16:00:27

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Adding a players name to a game

scratchyrocks wrote:

when i receive [name v]
ask [what is your name?] and wait
set [name v] to (answer)
say <join [hi,] (name)>
do whatever you want

Fixed.


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer