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

#1 2012-04-22 16:20:14

lolo456
New Scratcher
Registered: 2012-04-22
Posts: 2

Help me with project

Hello  smile

I am beginner with scratch and need to make script, description below:

The new script you are going to build will allow users to type in a single line of characters. To achieve this, the script should detect when a key has been pressed and a character drawn, and move the sprite into position to write the next character.

Drawing lines of characters

Obviously a word processor has to be able to display characters in lines on the page. In this application, you’ll make the first line begin at coordinates -220, 140 on the Stage  A line will contain 12 characters, with each character separated from the next by 10 pen steps.

any solution?

Thank you.

Offline

 

#2 2012-04-22 16:26:18

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

Re: Help me with project

I'm not totally sure what you want... have a look at my project and see if you get inspiration.
http://scratch.mit.edu/projects/PhirripSyrrip/2484133


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

Offline

 

#3 2012-04-22 18:41:37

bobinthebag
New Scratcher
Registered: 2012-04-22
Posts: 6

Re: Help me with project

Lolo I had the same question which was posted and resolved earlier today, checkout http://scratch.mit.edu/forums/viewtopic.php?id=95473 and let me know what you think?

Offline

 

#4 2012-04-22 19:27:18

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Help me with project

To make it accurately simulate a text-editor, you'll probably want to use the hat block "when key [] pressed", and have it type with the stamp block by moving right, switching the letter's costume and stamping it.  The amount you should move right will probably depend on what letter it is (depending on what font you're using).  I had a project with a good example of a text editor, but I deleted it (that was pretty much all it had xD).

Alternatively, the "ask [] and wait" block could serve your purposes; see this wiki article.

Edit: you can't set the x and y coordinates of the prompt text-box of the "ask [] and wait" block, and it can look unprofessional, but it is far easier than trying to make a text editor.

Last edited by MoreGamesNow (2012-04-22 19:28:32)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#5 2012-04-23 06:25:26

lolo456
New Scratcher
Registered: 2012-04-22
Posts: 2

Re: Help me with project

Hello  smile

Thank you all for respond I will try to work it out.

Offline

 

#6 2012-04-23 08:04:21

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Help me with project

You might want to check if it's too close to the edge, and if it is, go on to the next line.

Offline

 

#7 2012-04-23 08:20:54

WeirdG
Scratcher
Registered: 2009-09-12
Posts: 9

Re: Help me with project

Im not sure what your talking about?

Offline

 

Board footer