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

#1 2011-04-09 17:16:48

Fruity29
New Scratcher
Registered: 2011-02-03
Posts: 2

How to make a sprite say "Text Variable text" in one speech bubble.

Intro

Have you ever, say, been creating an RPG and have wanted to have someone say a line of text, with a variable AND other text, in one speech bubble? Some of the people who view this might be thinking "Impossible". Others might say "I already know this". And there is some of you who think "What is a 'RPG' or 'Variable'?". Hopefully, this guide will appeal to all. Otherwise, this is a good way to spend my weekend  smile  ! Let's Begin!

Section One:Why and How

Why
What are the uses of being able to say a variable and another piece of text? A good example of a project is one created by the SampleProjectsTeam (I'm very sorry, but it DOES need a LOT of improvements). http://scratch.mit.edu/projects/SampleProjectsTeam/583767
Copy and paste. If you go through it, you'll see after they ask for your name, the baby says "Why, hello there" in one bubble and "Your Name(or whatever you answered her)" in the next. This both looks sloppy and unprofessional. It also looks
very
choppy.
My strategy is very easy and helps avoid all those problems.

How
Some people reading this might be thinking "What's so hard? You just do the following
[blocks]<say[Hello Variable ]for( 2 )secs>[/blocks] ?"
Well, that doesn't work. The variable snaps on and leave no room for you to type. So what does work? One block. Look in the "Operators" folder. In the fifth group, is the block http://www.freeimagehosting.net/image.php?7e03a335fd.gif.
This one block is the key. Using that block is more amazing than it is given credit for. So, to learn more about this clever little block, let's continue.

Section Two:The Scripting

So you are ready to script people saying variable and text. Good. Now first you need to create a variable and give it a value (the way you will probably want to do this is to ask a question, and change the variable to the answer. In that case use this script http://www.freeimagehosting.net/uploads/23752c6e89.gif). Done? Good. Now do you remember this script http://www.freeimagehosting.net/image.php?7e03a335fd.gif? Let's just call it the join block. All you need to do is snap one of those on a say block, snap a variable block on one end, and type in the other end. The finished product is this http://www.freeimagehosting.net/uploads/e98cf0303a.gif . But what if you want to have text, then a variable, and then more text. The answer is easy. Just snap another join block on the second part of the first join block, or this http://www.freeimagehosting.net/uploads/f665ff23fb.gif.

THE END!
Yay! I finished my first post!
Please check out my soon-to-be project, Animal Crossing RPG by Fruit29. Leave comments on a Show-and-Tell I will make or project.
Thanks to:
FreeImageHosting.net
The Scratch Team
All the makers of Scratch projects that made me realize this issue.
And last, but not least...
YOU!
Revisions welcomed!

Offline

 

#2 2011-04-10 08:46:54

SpriteMaster
Scratcher
Registered: 2009-01-25
Posts: 1000+

Re: How to make a sprite say "Text Variable text" in one speech bubble.

Pretty good for a first post! BD


`                        Click here for my YouTube channel!                        `http://i.imgur.com/4Qz3I.jpg

Offline

 

#3 2011-04-11 14:28:09

The_Dancing_Donut
Scratcher
Registered: 2010-08-03
Posts: 1000+

Re: How to make a sprite say "Text Variable text" in one speech bubble.

Very useful for a beginner! This is so great for a first post!

Maybe it should be ITopic'd somewhere? Or at least given some credit  smile


Offending strangers since 2010.

Offline

 

Board footer