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

#26 2008-09-18 18:28:56

me321123
Scratcher
Registered: 2008-08-04
Posts: 9

Re: ITopic: Little-Known Scratch Tips

http://scratch.mit.edu/forums/viewtopic.php?id=6428#req_message
http://scratch.mit.edu/forums/viewtopic.php?id=6428#req_messagehttp://scratch.mit.edu/forums/viewtopic.php?id=6428#req_message
1http://scratch.mit.edu/forums/viewtopic.php?id=6428#req_message2http://scratch.mit.edu/forums/viewtopic.php?id=6428#req_message

Offline

 

#27 2008-09-18 18:30:54

me321123
Scratcher
Registered: 2008-08-04
Posts: 9

Re: ITopic: Little-Known Scratch Tips

http://scratch.mit.edu/forums/post.php?tid=6428#req_message

Offline

 

#28 2008-12-28 09:12:03

GoldenAxe
Scratcher
Registered: 2008-12-10
Posts: 48

Re: ITopic: Little-Known Scratch Tips

Very NICE ^_^

Offline

 

#29 2008-12-30 09:11:28

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: ITopic: Little-Known Scratch Tips

These are really good tips. Here's another that i found out just a week ago that i could have used in a lot of my platformer games that would make it run a lot smoother.

Instead of having to have costumes for a sprite facing both right AND left, you could just have one set of costumes facing one way and then click the the little arrow button to the top near where it says the sprites name that looks like this: <->

Then you would just add a script:

when flag clicked
forever
if right arrow key pressed point in direction 90
if left arrow key pressed point in direction -90


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#30 2008-12-30 09:12:46

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: ITopic: Little-Known Scratch Tips

oh no i didn't want that minus sign to appear! the button looks like a line with to arrows on  the end of it. <----->


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#31 2009-02-01 15:26:26

DarthPickley
Scratcher
Registered: 2008-06-13
Posts: 100+

Re: ITopic: Little-Known Scratch Tips

DrSuper wrote:

I have tried unlocking sprites and moving them I have the following issues:
1. I need a way to dynamically lock or unlock a sprite.
2. A locked sprite considers mouse down as a click but for an unlocked sprite "clicked" means the mouse has been pressed and has come up in a short (?) time interval. If I just drag an unlocked sprite it is not considered "clicked" and the scripts will not start firing until you actually click the sprite. Do you know a way around this. I really need a mouse down event for unlocked sprites;=<
Regards
Dr. Super

1. One good, less glitchy [than the set x and y answer] answer is to have your own custom code for dragging, which only executes
[blocks]
<when[ Sprite ]clicked>
<if><( <{ unlocked? }> <=> 0 )>
DRAGGING CODE 1
<repeat until><<  <not> <mouse down?> >>
DRAGGING CODE 2
<end>
<end>
[/blocks]
It could be as simple as:
[blocks]
DRAGGING CODE 2:
<go to[ mouse-pointer ]>
[/blocks]
or just keep its x and y positions relative to the mouse pointer using:
[blocks]
DRAGGING CODE 1:
<set{ dragrelx }to( (( <x position> <-> <mouse x> ))
<set{ dragrely }to( (( <y position> <-> <mouse y> ))

DRAGGING CODE 2:


[/blocks]

Sorry I've got to go.

Offline

 

#32 2009-02-23 21:13:35

modman
Scratcher
Registered: 2009-01-28
Posts: 3

Re: ITopic: Little-Known Scratch Tips

DrSuper wrote:

Thanks for sharing. I did not know about lock/unlock ;=< I am new to Scratch and reinvented it as follows (It may come in handy if you want a locked sprite that you can drag under certain conditions)

in a forever loop set x and y of the selected sprite to the x and y of the mouse
Inside this loop it keep the equality as long and the mouse is pressed (the sprite is getting dragged) as soon as the mouse is released stop the script.

One question for you. Do you know how we can get the shadow that sprites have in design at run time when they are selected?

All you have to do to make it drag correctly is to make it only execute when the mouse is touching the object you want to drag.

Offline

 

#33 2009-03-26 20:09:36

jmarq82
Scratcher
Registered: 2009-03-25
Posts: 54

Re: ITopic: Little-Known Scratch Tips

bosox397 wrote:

These are really good tips. Here's another that i found out just a week ago that i could have used in a lot of my platformer games that would make it run a lot smoother.

Instead of having to have costumes for a sprite facing both right AND left, you could just have one set of costumes facing one way and then click the the little arrow button to the top near where it says the sprites name that looks like this: <->

Then you would just add a script:

when flag clicked
forever
if right arrow key pressed point in direction 90
if left arrow key pressed point in direction -90

nice i actually was looking for this thanks.

Offline

 

#34 2009-04-13 19:54:57

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

Re: ITopic: Little-Known Scratch Tips

Here's a little trick I've been using. If you have a really long script and you want to move a block to a different part of it, instead of dragging it there a little bit at a time, just delete it, scroll to the right place, then click undo. It's like cut-and-paste.

You can also copy-and-paste (kind of). Duplicate a block then dump it into the list of blocks on the left (delete it, in other words). Again, go wherever you want it (including a different sprite) and click undo.


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

 

#35 2009-05-12 14:25:33

gusyehia
Scratcher
Registered: 2009-05-12
Posts: 15

Re: ITopic: Little-Known Scratch Tips

thank you very much for this useful tips, frankly i am new to this scratch, but really interesting much to learn

Offline

 

#36 2009-05-14 09:14:44

ssstratton
Scratcher
Registered: 2009-05-14
Posts: 1

Re: ITopic: Little-Known Scratch Tips

I found the list concatenation very useful - this allows you to construct a list, and then 'say' the whole list.  The only problem is that a space is inserted between every item in the list.

Offline

 

#37 2009-05-24 18:43:04

ScratchDude101
Scratcher
Registered: 2009-01-30
Posts: 100+

Re: ITopic: Little-Known Scratch Tips

Well, I already knew all of these but one thing to mention:

fullmoon wrote:

The Lost Video Support

In Scratch 1.0.1, you can shift-click on Extras to enable some experimental blocks in Sensing and Sound. They don't do anything, but they're fun to ponder.

Not just 1.0.1, but 1.3.1 also has it. You can press "write project summary" and "write multiple project summaries" or "set single stepping".

Anways, if you put that above, remember to give me credit.


Why did I even name myself "ScratchDude101?" I'm Cronos Dage.
http://cl.ly/EDZM/Screenshot%202012-02-14%20at%206.17.40%20pm.png

Offline

 

#38 2009-06-13 20:52:22

bigreader
Scratcher
Registered: 2007-08-14
Posts: 100+

Re: ITopic: Little-Known Scratch Tips

PetertheGeek wrote:

You can right click the stage and click "Grab Screen Region for New Sprite" and then select any region in the Scratch program and it will turn it into a new sprite. This is good for making tutorials if you want a picture of the scripts you used.

For making a picture without having to fill in all those little lines, drop a comment and size it to fit the scripts you want to copy and put them in. Easy!


I'm currently taking a break from Scratch.
Zing - now even easier to install!

Offline

 

#39 2009-07-05 08:00:23

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: ITopic: Little-Known Scratch Tips

fullmoon wrote:

One-Dimensional Dragging

For whatever intristic reason, blocks seem to override the lock/unlock feature that lets you drag sprites. This means that if you want something to only be draggable up and down, just put code like this on the sprite and "unlock" it:

When Flag Clicked:
Forever:
Set x to 168
End Forever

Be careful with this one: It does not work on the website.
See below.

Last edited by billyedward (2009-07-29 17:38:31)


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#40 2009-07-29 17:36:08

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: ITopic: Little-Known Scratch Tips

The one dimensional dragging doesn't work on the java. Here's how to make it:
<when green flag clicked>
<forever if><< <touching[ mouse pointer  <and>  <mouse down?> >>
<set x to( <mouse x> )
<end>
[/blocks]

Last edited by billyedward (2009-07-29 17:44:50)


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#41 2009-08-02 18:35:39

sanda427
Scratcher
Registered: 2008-12-02
Posts: 96

Re: ITopic: Little-Known Scratch Tips

Thank you, These tips are very helpful. ^^'


http://squiby.net/view/2246392.png

Offline

 

#42 2009-08-11 21:57:51

hamsandwitch678
Scratcher
Registered: 2008-10-15
Posts: 100+

Re: ITopic: Little-Known Scratch Tips

Wow!!!  That's cool.  Especially the 1.0.1 trick.


You won't get in a jam when you add a little ham because when you add meat, your life will be sweet.                     .

Offline

 

#43 2009-08-18 22:26:19

indianaj
Scratcher
Registered: 2008-03-01
Posts: 13

Re: ITopic: Little-Known Scratch Tips

Thanks, fullmoon.  I never knew about that turning local to global thing

Offline

 

#44 2009-12-01 16:07:48

fluterock
Scratcher
Registered: 2009-12-01
Posts: 4

Re: ITopic: Little-Known Scratch Tips

i didn't know about the lock/unlock thing either (that will help a lot).  and i have a question.  how do you have a "click screen to continue" and then not have the game go to the same place every time that you accidentally click the screen?

Offline

 

#45 2009-12-03 22:21:21

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Little-Known Scratch Tips

fluterock wrote:

i didn't know about the lock/unlock thing either (that will help a lot).  and i have a question.  how do you have a "click screen to continue" and then not have the game go to the same place every time that you accidentally click the screen?

Code:

var clicked=0

when stage clicked{
  if(clicked = 0){
    broadcast [continue]
    clicked=1
  }
}

http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#46 2009-12-27 12:42:52

MrMunchkin
Scratcher
Registered: 2009-05-16
Posts: 86

Re: ITopic: Little-Known Scratch Tips

fullmoon how did you get your signature?

Code:

http://scratch.mit.edu/projects/MrMunchkin/808516

http://scratch.mit.edu/projects/MrMunchkin/958570 http://scratch.mit.edu/projects/MrMunchkin/1074952
Check Them Out!

Offline

 

#47 2009-12-27 13:13:39

Morphed
Scratcher
Registered: 2009-12-09
Posts: 89

Re: ITopic: Little-Known Scratch Tips

fullmoon wrote:

neksus wrote:

Use variables for numbers you use more than 2-3 times.
Then, if you're testing or want to change something, you only need to change the variable and not all 50 instances of the number!

Good point; many of us have learned this the hard way.

Exactly what I have explained here:
http://scratch.mit.edu/projects/Morphed/819784

It says as part of animation tips to make a variable like Animation Delay or such and set it to the time that seems  most practical as the timing for your Animation, then put it in the Wait ___ Secs Block.






big_smile  Scratch on
<clear graphic effects>


http://scratch.mit.edu/static/icons/buddy/435431_med.png?t=2010-01-24+19%3A31%3A51 "A bird In the hand is better than above you."
Wowie. Econimy go boom daddy....

Offline

 

#48 2010-01-04 07:05:21

doogle26
Scratcher
Registered: 2009-09-07
Posts: 100+

Re: ITopic: Little-Known Scratch Tips

heres one more thing u may wanna add is that if the programmer wants to make a sprite follow the mouse simply
when "gren flag clicked"
Forever
set sprite x to {mouse x}
set sprite y to {mouse y}

simple but some dont know that!
hope it helps

Offline

 

#49 2010-01-24 22:05:37

aroosh
Scratcher
Registered: 2010-01-24
Posts: 1

Re: ITopic: Little-Known Scratch Tips

Hi,
I am trying to use control and it is always executing the else statement. Here is the control flow:-

<forever>
<if>
<key[  1]pressed?>
<change{ score }by( 1)
<else>
<change{opponent  }by( 1)

Now, everytime, I the keyboard 1 is pressed the variable opponent is incresaed by 1.

Any help would be appreciated.

-Thanks,

Aroosh

Offline

 

#50 2010-02-21 10:53:30

jake451998
Scratcher
Registered: 2009-04-01
Posts: 100+

Re: ITopic: Little-Known Scratch Tips

fullmoon wrote:

I think I'll make this into a project someday, but I thought I'd share some of the fruits of my Scratch addiction with the world. Here are some tips that I'm sure very few people know of; I found one of them today!

Quick Local>Global Variable Switch:

NOTE: Global variables are "for all sprites" and local (or private) variables are "for this sprite only" (using the phrases from the "make a variable" dialog).

Ever spend three hours on a project, making some single sprite use global variables, then decide that you want to add more sprites, but they all have to have their own? Sorry, can't help with that. However, you CAN go in the other direction. If you have a local variable you want to make global, just drag the scripts that contains blocks that deal with the locals you want to make global onto the Stage. It'll automatically create globals of the same name.


Say <Boolean> for 2 seconds

It's possible to put a boolean (triangle-cornered) block into "say" or "think" blocks. The sprite will say either "true" or "false".


One-Dimensional Dragging

For whatever reason, blocks seem to override the lock/unlock feature that lets you drag sprites. This means that if you want something to only be draggable up and down, just put code like this on the sprite and "unlock" it:

When Flag Clicked:
Forever:
Set x to 168
End Forever


Voodoo Fix for Sound Issue

On my admittedly ancient computer, Scratch often speeds up my sounds just for the heck of it. This really ticks me off. Today, while trying to fix Scratch and my microphone at the same time, I found that opening Sound Recorder in Windows, recording sounds for a few seconds, then closing it without saving causes Scratch to play sounds at normal speed (for a while, at least).


The Lost Video Support

In Scratch 1.0.1 (download here), you can shift-click on Extras to enable some experimental blocks in Sensing and Sound. They don't do anything, but the're fun to ponder.


I'll put any more on as I find them. Thanks for reading!

Awesome!Why do you call the sound bug 'Voodoo' though?

Offline

 

Board footer