*****Okay Post Away !*****
Welcome To Demosthenes' Meaghelp Thread! Here you will all sorts of tutorials, guides, tricks, and tips to help you along your way with Scratch.
Table of Contents:
Note links may not be exact and you may have to scroll up or down.
Programming:
1. Programming Tip of the Day
2. Advanced Sprite Movement
3. Scrolling + Infinite Scrolling
Forum Use:
1. Your Guide to BBC Code
2. Forum Guidelines
3. How Do I Know Where My Topic Goes?
Misc:
1. Little Known Scratch Secrets
2. Questions I've Answered
I hope you enjoy all the material I've posted here for you. Feel free to ask me questions if you don't understand something.
Last edited by demosthenes (2009-11-27 12:03:52)
Offline
Programming:
1. This is the section for programming tips of the day!
November 26, 2009: KISS-Keep it simple, stupid. This acronym is a commonly used programming turn. What it means, that when in doubt you should keep your program as simple as possible.
Previous Tips:
2. This is your guide to advanced programming of movement with the Velocity variable.
"Velocity" is just the name of a variable, just because it is named velocity doesn't make a difference.
However, if you want to know how to use velocity in one of your games I can help.
Let's start with "Y Velocity":
Using yVelocity will help if you want to make good jumping scripts for your games.
To start this session of testing arrange the stage like this:
If the image doesn't load go to this link: http://img144.imageshack.us/my.php?image=stage.gif
Then in the Cat sprite make this script:
If the image doesn't load go to this link: http://www.freeimagehosting.net/uploads/b9aa2fc28e.png
Text of the comment block (if you can't read it):
This is a basic jumping script. We'll start by breaking it down. The first if statement with the set yVelocity to 0 block in it is their so the cat will not fall through the ground. The next if with the set yVelocity to 15 block in it will function if the cat is on the ground and the up arrow is pressed and will make the cat jump.
Out of that set of ifs the change y by yVelocity will make him fall or rise depending on the velocity variable. And the change yVelocity by -1 is gravity.
Remember that you can change the 15 in the;
block to make the cat jump higher!
That covers Y Velocity I'll post a tutorial for X Velocity in a little.
X Velocity:
"xVelocity" will help you make movement along the X Axis seem more realistic.
Start by arranging your stage like this:
If the picture doesn't load go to this page: http://img149.imageshack.us/my.php?image=stage2.gif
Then in the Cat sprite make the following script:
If the picture doesn't load go to this page: http://img149.imageshack.us/my.php?image=picture6zrl.png
Text of the comment block (if you couldn't read it):
This is the basic script needed to move a sprite along the X Axis with velocity. maxSpeed can be any number you won't depending on how fast you want your sprite to go. The first two if statements will change the xVelocity variable by certain numbers. These numbers can change if you want the sprite to move faster.
The next if-else will make the sprite point in the direction he is moving.
The block: change x by xVelocity will make him move depeding on how fast he is going. The last block is friction and will make the sprite eventually slow to a halt
Now if you combine these two scripts you have perfect jumping and running. I hope this helped answer your questions. If you need any further information post your question and I'll reply as soon as possible.
3. Here is a guide posted by Archmage on how to scroll effectively.
archmage wrote:
I am going to try and explain how to scroll stuff in scratch but you better be good at programming in scratch before you try this. I do not recommend a scrolling game as your first project.
There are 2 methods of scrolling I use. Method 1 uses many sprites, is easy to implement but can cause lag if the area is too large. Method 2 uses just 2 sprites but does not lag.
METHOD 1: SCROLLING WITH MANY SPRITES
For a demonstration of this method go to http://scratch.mit.edu/projects/archmage/76150
Ok first create a new variable called scrollX
<{ scrollX }>
Now that we have that we will need to have our scrolling sprites.
So make a sprite called terrian0.
*It is important to name the sprite terrain0 instead of terrain1 to check and adjust a value used to scroll.*
Now some of these numbers may vary in value depending on the size of your sprite. This assumes your sprite is as wide as the screen.
The number 480 in this code block represents the stage's total width.
//This should be placed on the sprite "terrain0"
<when green flag clicked>
<forever>
<set x to( (( <{ scrollX }> <+> (( 480 <*> 0 )) ))
Now the 480 * 0 bit is not necessary in the first sprite you want to scroll but we will keep it in there so we can use it when we duplicate the sprite using the duplicate tool. What that number actually represents is the number at the end of the sprite's name so for the sprite terrain1 you would put
<forever>
<set x to( (( <{ scrollX }> <+> (( 480 <*> 1 )) ))
and for terrain2 you would put a 2 instead of a 1 and so on.
Now the number at the end of the sprites name will dictate the order of the sprites so if you keep moving right you will first see terrain1 then terrain2 then terrain3 ect.
now here is a simple script that demonstrates how to alter the scrollX variable to make your sprites scroll.
This code should be placed on the stage. Using this code on multiple sprites is not necessary and not recommended.
<when green flag clicked>
<forever if> <key[ right arrow ]pressed?>
<change{ scrollX }by( 5
<forever if> <key[ left arrow ]pressed?>
<change{ scrollX }by( -5
METHOD 2:SCROLLING WITH 2 SPRITES
For a demonstration of this method go to http://scratch.mit.edu/projects/archmage/82995
You should already be comfortable using the first scrolling method as this method is more difficult
You will need to create 3 different variables for this method
<{ scrollX }> //This variables keeps track of how far the user has scrolled
<{ terrainNum }> //This is used to let the terrain sprite know what terrain should be displayed
<{ xVelocity }> //For some reason I was unable to get linear movement to make the terrain sprite not flicker with this method. However when the scrolling variable is changed according to the xVelocity variable the scrolling works as it should and does not flicker.
*Place these scripts on the stage*
<when green flag clicked>
<forever>
<if> <( (( <round( <{ scrollX }> </> 480 )) <>> (( <{ scrollX }> </> 480 )) )>
<set{ terrainNum }to( (( <round( (( <{ scrollX }> </> -480 )) <+> 1 ))
<else>
<set{ terrainNum }to( <round( (( <{ scrollX }> </> -480 ))
What this script does is it divides the scroll variable by the stage's width and then rounds it down to the nearest whole number.
<when green flag clicked>
<forever>
<if> <key[ right arrow ]pressed?>
<change{ xVelocity }by( -2
<end>
<if> <key[ left arrow ]pressed?>
<change{ xVelocity }by( 2
<end>
<set{ xVelocity }to( (( <{ xVelocity }> <*> 0.9 ))
<change{ scrollX }by( <{ xVelocity }>
<end>
This is a basic movement code that uses the xVelocity variable to change the scrollX variable.
Now before we begin programming on the terrain sprites it is very important to remember that BOTH of the two terrain sprites must have exactly the same costumes in exactly the same order. Now doing this will result in weird changing of the terrain sprites to incorrect costumes.
Make sure you have created 2 terrain sprites called "terrain1" and "terrain2".
Now put this code on terrain1.
<when green flag clicked>
<forever>
<switch to costume[ <{ terrainNum }>
<set x to( (( <{ scrollX }> <+> (( 480 <*> (( <{ terrainNum }> <-> 1 )) ))))
<end>
What this script does is it sets it's costume according to the terrainNum variable and then it sets it's x position to scrollX+(480*(terrainNum-1)). When the terrainNum variable changes it makes the terrain scripts change costumes accordingly and move to the proper position.
Now put this code on terrain2.
<when green flag clicked>
<forever>
<switch to costume[ (( <{ terrainNum }> <+> 1 ))
<set x to( (( <{ scrollX }> <+> (( 480 <*> <{ terrainNum }> ))))
<end>
This script is similar to the script on the first terrain sprite but it has been altered to appear in front of the terrain1 sprite.
Both methods when used correctly will produce a scrolling effect.
If you want to see examples of projects that feature scrolling go to this gallery.
http://scratch.mit.edu/galleries/view/8494
Lots of thanks to Archmage!
Last edited by demosthenes (2009-11-27 12:01:27)
Offline
Forum Use:
1. This is a guide to BBC code presented by Jonathanpb
Jonathanpb wrote:
I've seen a topic before that told you all about BBCode. This topic was great (in fact, it got stickied), but sometimes it could be a bit confusing (and it didn't include all of the BBCode tips and tricks anyway). Nevertheless, I learned almost everything about BBCode from it. Therefore, I decided to make a topic that teaches you BBCode neatly and clearly. The instructions follow below. But first, two things to remember:
1. The BBCode instructions always are in brackets (if you don't know, brackets are these things: [ and ]).
2. The first instruction is written normally, but the second has a slash (this slash: / ) before the instructions.
Contents (so you know what's in here)
BBCode Instructions
Bold, italic, and underline
Color Text
Quote Boxes
Code Boxes
Smileys
Website stuff (normal links, custom names for links, picture links)
Pictures
Invisible Text
Extras
Questions about BBCode
Tips
And the super-fast way to learn BBCode (without all of the nice notes and things)
______________________________________________________________________________________________________
Bold, italic, and underline
Using these three effects can seem useless, but you can easily use them to strengthen your posts. The BBCode for these three is very easy.
Bold:Code:
[b]Text goes here[/b]Italics:
Code:
[i]Text goes here[/i]Underline:
Code:
[u]Text goes here[/u]As an example:
Code:
[i]This is some text.[/i]would appear as This is some text.
Simple, isn't it?
Color Text
Colors are fun, aren't they? You can use them in your signature, for different purposes. Use the color black to emphasize font more gently than bold, and use green and red for different meanings. Of course, it's all up to you.
The first way:Code:
[color=(whatever color you want)]Place your text you want to color here.[/color]Just a few things to make clear here:
1. There are limited colors that you can use. But there are plenty of choices. For a complete list, check out the list in Wikipedia's article Web colors Use the name of the color, not a hexidecimal.
2. The second instruction is always '/color'; it does not change like '/red' or '/blue'.
The second way:
Use the Hexadecimal number of your color with a hash:Code:
[color=#ff0000]Text goes here[/color]Make sure you add that hash!
The second instruction is the same as the previous method; it's '/color'.
You can see the hexidecimals for the same colors as the previous method in the same list, but for the exact colors (use hexidecimals for an exact color; they cover practically color), use a program.
Quotes Boxes
Sure, you know the button than lets you quote someone, don't you? But it's still BBCode, and you should know how to do a quote without using the quote button. And if you know how, you can easily know how to do several quotes in one post, and you can arrange them well too. Personally, I write the BBCode for quotes sometimes instead of clicking the button. Anyway, back to it.
The code:Code:
[quote=(whoever you want to quote]The text you're quoting.[/quote]If I were quoting myself, I'd write it like this:
Code:
[quote=Jonathanpb]The text I'm quoting.[/quote]A few tips here:
1. If you don't input a name, you'll get a quote with no author.wrote:
See?
2. If you don't input a name and equals sign ( = ) you'll get a nice textbox.
See?
Code Boxes
If you want to write some code, you should use the BBCode for your code. But what I use it for is demonstrating BBCode. In Code Boxes, you can't use BBCode. So goodbye to italics and more. But the nice feature about this is that you can use it to show people how to do BBCode (as I am doing now). It's easy:Code:
[(code)]Write your code here.[(/code)]Forget about the parentheses; I had to put them there or it wouldn't post this topic ('Wrong BBCode syntax').
You know what? Forum moderators and the Scratch Team and disable or enable BBCode in posts. This means that they don't need to show how to do BBCode in code boxes (otherwise, you would see BBCode instead of instructions for it).
Smileys
Yes, the nice smileys are BBCode! Here's how to do the smileys:
The smileys:
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
And how to do them:Code:
:) or =) :| or =| :( or =( :D or =D :o or :O ;) :/ :P :lol: :mad: :rolleyes: :cool:Links (with names or pictures for them), and pictures
That link will take you to the Scratch Forums Index, if you're wondering. Go on, click it if you want.
If you want to post a link, you don't have to do this:Code:
[url]http://scratch.mit.edu/forums/index.php[/url]I've seen someone make this mistake once. Just to let you Scratchers know, you don't have to do that. Just post the web address. Simple as that. Though it will look ugly. To make it look nice, you can do this:
Code:
[url=http://scratch.mit.edu/forums/index.php]Scratch Forums Index[/url]It will look like this: Scratch Forums Index. Of course, you can name it whatever you want. Just type the name you want into the section between the brackets. You can use smileys and get a smiley link. And color, bold, italic, and underline work as well.
For pictures, do this:Code:
[url](website with picture goes here)[/url]Here's an example: http://scratch.mit.edu/static/icons/bud … %3A44%3A18
My avatar!
Make sure you use the web address that only has the picture, not a web page that happens to have a picture.
If you want a link that has a photo (this was mentioned by greenflash), you can do this:Code:
[url=(website link goes here)][url](website with picture goes here)[/url][/url]Here's an example:
http://scratch.mit.edu/static/icons/bud … %3A44%3A18
My avatar again! Click it to go to the Scratch Forums Index.
Scratch Blocks
These you don't have to type, you can select different blocks from the block area below the spot where you type your post. Go on, try it!
Invisible Text Invisible Text
This isn't exactly BBCode: it's just color. To see how to do color text, see above.
The easy way (that isn't exact):
For normal posts, use the color Gainsboro. Highlight the following: Invisible Text
For quotes boxes, use the color LavenderBlush. Highlight the following:Invisible Text
The hard way (that is exact):
For normal posts, use the hexidecimal dedfdf. See how it's the exact color: Invisible Text
For quote boxes, use the hexidecimal f1f1f1. See how it's the exact color:Invisible Text
______________________________________________________________________________________________________
Tips:
For extreme bold, use bold and the color black. Such as this: Super-bold!
To do this:Here is some text:
You use bold and fake the 'Jonathanpb wrote' thing, and then you continue. Don't forget to use the box, and not the quote box!One nice thing about italics is that you can do this:
Last edited by Jonathanpb (Today 12:35:47)
It's fake, but it looks real. Of course, if you edit your post and don't get rid of the fake edit, you'll end up with two edits (one fake and one real)!
You can nest BBCode! Such as this:Code:
[b][i][u]Text[/u][/i][/b]Will create Text.
Questions about BBCode
Can you nest BBCode? Yes. Instructions are in the Tips.
How many colors are there for color text? 143 for the color text with color names, and practically unlimited for the color text with hexadecimals.
If you have a question, just post and ask.
The super-fast way to learn BBCode (without all of the notes and stuff)
If you're in a rush, here's a quick guide. It does not have all of the notes and extras. It is seriously recommended that you read the above instructions. This is for a quick guide.
I will use apostrophies instead of brackets so I don't have to demonstrate in code boxes.
Bold Text: 'b'Text goes here'/b'
Italic Text: 'i'Text goes here'/i'
Underline Text: 'u'Text goes here'/u'
Color Text (name of color): 'color=(color name goes here)'Text goes here'/color'
Color Text (hexadecimal color): 'color=#(hexadecimal goes here)'Text goes here'/color'
Quote Boxes: 'quote=(name goes here)'Quoted text goes here'/quote'
Code Boxes: 'code'Code goes here'/code'
Smileys (they will have spaces so they don't activate): : ) : | : ( : O ; ) : / : P : lol: : mad: : rolleyes: : cool:
Normal web link: Written down normally
Custom names for web link: 'url=(web link goes here)'(custom name goes here)'/url'
Picture web link: 'url=(web link goes here)''img'(web address with picture goes here)'/img''/url'
Picture: 'img'(web address with picture goes here)'/img'
Scratch Blocks: See the buttons below the posting area
Invisible Text (easy but not exact): Color text with Gainsboro for normal posts and LavenderBlush for quote boxes
Invisible Text (harder but exact): Hexadecimals dedfdf for normal posts and f1f1f1 for quote boxes
Quick and easy - but read the above instructions sometime.
______________________________________________________________________________________________________
Hope this helped you,
Jonathanpb
Thank you Jonathanpb for this great tutorial
2. These are some general guidelines for the scratch forums. Although they do vary depending on which section you are using.
1. Post only topics that are to the forum you are posting in.
For Show and Tell, this includes advertising your galleries. projects. etc.
For All About Scratch it is help for scratchers and requests for help.
For more examples of what is appropriate to post in a certain forum read the stickied threads there or look below in the next section.
2. After you have posted a topic don't do things that could be considered 'spam'.
For example posting again and again on your own topic in an attempt to get more views is 'spam'.
3. Don't double post on anyones topics.
Double posting is when you post twice in a row with no reply in between.
This rule can change depending on the circumstances. As a general rule don't double post often.
4. Don't 'necropost' on topics.
SImniel wrote:
Edited for clarity.
5. Don't flame or troll.
Flaming is when you get angry at someone and you post a potentially hurtful reply directed at them. Trolling is similar is is the act of posting inflammatory, irrelevant, or controversial material.
Necroposting is when you post on a topic that hasn't received attention in a very long time.
If I think of any more tips I will add them.
3.
How do I know where my topic goes?
This question has plagued everyone at least once during their time on the scratch forums. This section attempts to address the issue, although there are always some exceptions and some gray area.
Announcements You cannot post new threads in this topic, so don't worry, nothing you can post goes here.
New Scratch Members This section is for making a thread introducing yourself to the scratch community or providing help for new members, nothing more.
Show and Tell This section is for advertising your projects or galleries please don't post anything that links somewhere off the website here, unless you know it is completely related to a project or gallery.
FAQ Like Announcements, you cannot post here. This section is for things that have been asked so many times that moderators or the scratch team decided to put them in FAQ.
All About Scratch This section is for asking for help from the scratch community or for giving a tutorial or a help thread for others to use.
Advanced Topics This section is not for advertising advanced projects, but for talking about advanced subjects that have to do with scratch, like modifications of the Scratch source code or using other programming languages to influence scratch.
Suggestions This section is for suggesting a new feature for the next release of Scratch, or for the scratch forums.
Troubleshooting This section is for posting when you have found a bug with scratch that you believe needs fixing.
Sensor Boards This section is for posts about picoboards, which is a product that allows you to gather real world input and use it to do something in a scratch program.
Educataors This forum section is closed and you cannot post in it. If you have something for educators go here: scratched.media.mit.edu
Scratch in other languages These sections are for, exactly what it says, discussing scratch in languages other than English.
Inspiration and More This is a section that basically covers anything that doesn't fall into other sections. For more information go there and read the various threads about its purpose.
Archived Forums These are forums that you are no longer aloud to post in because they have used up there purpose. If you want to play Text Based Games go here: http://scratch.mit.edu/tbgforums
Last edited by demosthenes (2009-11-27 12:17:49)
Offline
Misc:
1. This is a guide by the Scratch Team of some of the little known secrets of scratch.
natalie wrote:
Here's a list of tips and shortcuts from the Scratch programming team.
SPRITES
* Find a sprite: To show a sprite that's off the screen or hidden, Shift+click on its thumbnail in the sprite list (bottom right-corner of screen) - this will bring the sprite to the middle and show it.
- To turn a costume into a separate sprite, right-click (Mac Ctrl+click) and select "turn into a sprite".
- Drag the blue line on sprite thumbnail (in the middle of the screen) to rotate the sprite.
- To rotate a sprite from the stage, shift+click on the sprite.
- Shortcut to get a sprite to "point in direction 90": double-click on sprite thumbnail in the top middle of the screen.
- To delete a sprite, use the Scissors tool (or Right-click and choose "delete")
- To delete multiple sprites, Shift+click with the Scissors (it won't revert to the arrow)
-To make multiple copies of a sprite, Shift+click with the Copy tool (it won't revert to the arrow)
-Drag to reorder thumbnails in sprite list (bottom right corner of screen)
-Drag to reorder costumes in the Costume tab area
-To make a sprite that looks like part of the background, Right-click (Mac Ctrl+click) the stage to grab a portion of the image on the stage.
BLOCKS AND SCRIPTS
- To copy a stack of blocks from one sprite to another, drag the stack to the thumbnail of the other sprite (at the bottom right corner of the screen).
-To clean up the script area, right-click (Mac Ctrl+click) in Scripts area.
-Get help for any block: right-click (Mac Ctrl+click) on the block
- You can fit some blocks within other blocks. For example, you can put any Number or Sensing blocks with curved edges inside a "switch to costume" block or any block that has a white number or text area.
- Want to get the current x-y of a sprite? Click on the Motion category to update the x-y numbers in the glide and go-to blocks in the palette.
PAINT EDITOR
- To crop an image, outline it with the Selection tool, then Shift+delete (or Shift+backspace)
- To rotate part of a costume, use the selection tool, then click the left or right Rotate button (curved arrows).
- To rotate more precisely: Shift+click on the left or right Rotate button. It will let you enter a # of degrees to rotate
- Grow or shrink more precisely: Shift+click on the Grow or Shrink button (arrows pointing out or in). It will let you enter a % size for a costume
- To stamp multiple times, press Shift while using the Stamp tool.
- Press Shift with the Rectangle tool to make a square.
- Press Shift with the Oval tool to make a circle.
- Press Shift with Line tool to make a straight horizontal or vertical line.
- Press Shift key when clicking on a color square to change the other color.
- To pick up a color from outside the paint editor, select the Eyedropper tool, click in the Paint editor, then drag while holding down the mouse key.
REPORTERS & VARIABLES
- Check boxes to show monitors on stage
- Click a monitor to toggle between options (hide monitor name, show slider)
KEYBOARD SHORTCUTS (some of these are repeats with above)
-To delete multiple sprites, Shift+ click with the Scissors tool (it won't revert to the arrow).
- To make multiple copies of a sprite, Shift+click with Copy tool (it won't revert to the arrow).
- Ctrl+S to save your project.
OTHER
- You can drag multiple images at once into Scratch. They will become costumes within a sprite.
- You can drag in an animated gif.
- You can drag in images from a web browser, Word, and some other programs (on Windows).
- You can drag in a Scratch project from a file folder.
Thank you natalie!
2. This section is for questions that have been asked on this thread that I have answered.
Last edited by demosthenes (2009-11-27 12:23:36)
Offline
cocoanut wrote:
Wow! Nice! I'm sure that every member, new or old, will be helped by this. Good job!
Thanks A lot of it is thanks to other people who have posted guides so thanks to everyone who has (inadvertently) helped this thread.
Offline
Bump
Offline
Yup It lives up to the name of Meaghelp Thread.
Offline
Nice! I'm sure this will help many Scratchers
Offline
Thanks
Offline
Nice guide! I really like the way you can click the links to move around... how do they work? I clicked the Quote button and saw some extra characters at the end of the link. Am I being silly at the moment?
Offline
Thank you for adding my BBCode guide, demosthenes!
Instead of quoting everything, maybe it's better to give links to the topics. It's very cluttered, and the quote boxes make things thinner.
Great topic! I love it!
Offline
Chrischb wrote:
Nice guide! I really like the way you can click the links to move around... how do they work? I clicked the Quote button and saw some extra characters at the end of the link. Am I being silly at the moment?
If you look at the top left corner of a post you will see the date and time it was posted. This is actually a hyperlink to the post itself
Offline
Rainbow text:
Examples:
123456.
Offline
Hey followed your terrain number scrolling technique with the 2 sprites exactly how you put it but it still flickers and my guy falls through the floor can you please tell me how to fix this? thanks
Miggle101
Offline
This is impressive and all, but can someone explain color reactions and broadcasts to me? I put when something gets a certain broadcast, if it is touching this color, it reacts, but it doesn't do anything.
Offline
Ace-of-Spades wrote:
This is impressive and all, but can someone explain color reactions and broadcasts to me? I put when something gets a certain broadcast, if it is touching this color, it reacts, but it doesn't do anything.
I don't get you. What do you mean?
Offline
Have you seen the screenshot of my soon to be board game? Well some tiles affect the tiles around them.
[tile 2]
[tile 1] [active tile] [tile 3]
[tile 4]
When the middle tile is activated, a green glow, for example, appears around it, and it broadcasts "green activated". When all of the other tiles recieve 'green activated', the tiles only do something if they are touching the green glow. The active tile's costume # disables the effects of the tile on itself. It's not working though.
Offline
This is helpful!
Last edited by Chatter (1-16-10 11:16:25)
Last edited by Chatter (2010-01-16 23:22:59)
Offline
Hey demosthenes, I edited my BBCode guide (yes, I still edit it every once in a while). Can you please update your megahelp thread? Here's the link to my topic for convenience: here
Offline
Scratch Home Page
Click that to: Open Scratch Homepage.
This is a test.
That how links with invisible effect work.
Last edited by rdococ (2010-01-17 11:47:48)
Offline