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

#1 2012-12-28 12:56:17

ManUguy2001
Scratcher
Registered: 2012-07-15
Posts: 10

what is pen, sensing, operators and variables ACTUALLY effect?

You might have seen with my projects that I don't use a range. Please can someone tell me what they do.

Offline

 

#2 2012-12-28 13:14:14

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: what is pen, sensing, operators and variables ACTUALLY effect?

The Pen does what you would expect, it leaves a line behind sprites the same way as if you put a pen on paper and moved it.  The Pen Up and Pen Down blocks toggle whether or not you are drawing with the pen, and clear makes all pen marks go away.
Example:  Let's say you have a sprite on the left of the screen.  You use the Pen Down block.  Then you move the sprite to the right of the screen.  There will now be a line from where the sprite started to where it is now.  Like so:
http://i45.tinypic.com/j6nypl.gif

Sensing is the section you use when sprites interact with other sprites.  Here sprites detect if they are touching other sprites, use aspects of other sprites (like their direction or position), or generally need to react based on what other sprites are doing.
For example, you use these blocks to check if you are touching another sprite.
http://i47.tinypic.com/119vxbc.gif

Operators is the section you use when you need to calculate things or perform functions.
Using blocks like ([ ] + [ ]) let you add (the two empty spaces are so you can write out a math problem like 5 + 5) and so on and so forth.
http://i45.tinypic.com/312y4xe.gif

Variables are values (or numbers) that can change freely.  When you create a variable, it comes assigned to a number (by default it starts as 0).  Let's say that you create a variable named Variable1 and set it to 5.  From now on, you can say that Variable1 = 5.  Let's say you want a sprite to move at 5 blocks per frame.  Instead of [move (5) steps], you can now say [move (Variable1) steps] because Variable1 and 5 are interchangeable.  But let's say you want that speed to change during the project!  For that, you can change the variable.  Say you now want the sprite to move at 10 pixels per frame.  Just set Variable1 to 10.  Now [move (Variable1) steps] is interchangeable with [move (10) steps].  The use of this is that you can change the variable while the project is running instead of stopping the project and manually changing the number.
http://i45.tinypic.com/2qd8pc9.gif
http://i50.tinypic.com/29c54j9.gif

That may be a bit confusing, I'll write some more examples in a sec.

Last edited by Kileymeister (2012-12-28 13:32:18)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2012-12-28 13:25:08

ManUguy2001
Scratcher
Registered: 2012-07-15
Posts: 10

Re: what is pen, sensing, operators and variables ACTUALLY effect?

thank you but it is very confusing. Plz give me more examples. thank you.

Offline

 

#4 2012-12-29 05:08:24

Aditya007
Scratcher
Registered: 2012-11-27
Posts: 63

Re: what is pen, sensing, operators and variables ACTUALLY effect?

ManUguy2001 wrote:

thank you but it is very confusing. Plz give me more examples. thank you.

Its not that confusing!!!!! Keep scratching and yuo'll learn it


Wolf_OS!!!  smile  Check My Stuff  tongue  Need Help?  Currently, I am http://blocks.scratchr.org/API.php?user=Aditya007&action=onlineStatus&type=square
http://i49.tinypic.com/15gy1j6.jpg

Offline

 

#5 2012-12-29 09:09:15

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

Re: what is pen, sensing, operators and variables ACTUALLY effect?

Aditya007 wrote:

ManUguy2001 wrote:

thank you but it is very confusing. Plz give me more examples. thank you.

Its not that confusing!!!!! Keep scratching and yuo'll learn it

Actually, the whole concept of variables and computer-math can be a tough one to wrap your mind around.  I'm glad you found it pretty straightforward  smile


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

Offline

 

#6 2012-12-29 13:28:41

ManUguy2001
Scratcher
Registered: 2012-07-15
Posts: 10

Re: what is pen, sensing, operators and variables ACTUALLY effect?

ok I will try thank you aditya. I like your quote from Dr seuss

Offline

 

#7 2012-12-29 16:23:51

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

Re: what is pen, sensing, operators and variables ACTUALLY effect?

Thank you.  I like to put inspirational quotes in my signature.  I found a whole slew of them by Dr. Seuess that will probably last me a while  smile

To the people of the future who won't know what we're talking about, my sig says this:

“You're off to Great Places! Today is your day! Your mountain is waiting, So... get on your way!” - Dr. Seuss


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

Offline

 

#8 2012-12-30 01:09:58

Dyllio
Scratcher
Registered: 2012-11-04
Posts: 11

Re: what is pen, sensing, operators and variables ACTUALLY effect?

This is a example of what you can do with pen. Try it!

when gf clicked
clear
go to x: [0] y: [0]
set color effect to [0]
forever
glide [1] secs to x: [pick random [-240] to [240] y: [pick random [-180] to [180]
stamp
change color effect by 10
Enjoy!

Offline

 

#9 2012-12-30 01:11:08

Dyllio
Scratcher
Registered: 2012-11-04
Posts: 11

Re: what is pen, sensing, operators and variables ACTUALLY effect?

to x: pick random -240 to 240 y: pick random -180 to 180

Offline

 

#10 2012-12-31 02:23:42

ManUguy2001
Scratcher
Registered: 2012-07-15
Posts: 10

Re: what is pen, sensing, operators and variables ACTUALLY effect?

Thanks Dyllio. I will try it.

Offline

 

#11 2012-12-31 08:13:37

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: what is pen, sensing, operators and variables ACTUALLY effect?

Dyllio wrote:

This is a example of what you can do with pen. Try it!

when gf clicked
go to x: (0) y: (0)
set pen color to (0)
clear
pen down
forever
go to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
change pen color by (10)
Enjoy!

Fixed an improved your script.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#12 2012-12-31 09:19:57

ManUguy2001
Scratcher
Registered: 2012-07-15
Posts: 10

Re: what is pen, sensing, operators and variables ACTUALLY effect?

what is it supposed to do. Just in case I get it wrong

Offline

 

#13 2012-12-31 09:40:28

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: what is pen, sensing, operators and variables ACTUALLY effect?

ManUguy2001 wrote:

what is it supposed to do. Just in case I get it wrong

From what I can tell, that script will create a bunch of colorful lines across the stage.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#14 2012-12-31 09:44:37

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: what is pen, sensing, operators and variables ACTUALLY effect?

Kileymeister wrote:

ManUguy2001 wrote:

what is it supposed to do. Just in case I get it wrong

From what I can tell, that script will create a bunch of colorful lines across the stage.

Yes.  wink


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#15 2012-12-31 10:50:20

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: what is pen, sensing, operators and variables ACTUALLY effect?

Variables store things, operators do math, sensing senses (like touching [ v] is if your touching that thing,) pen draws.


http://blocks.scratchr.org/API.php?user=SFollis&action=projects&type=newest&return=image&num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&action=projects&type=newest&return=text&num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&action=projects&type=newest&return=views&num=1 views

Offline

 

#16 2012-12-31 11:04:55

minecraftpe123
Scratcher
Registered: 2012-11-18
Posts: 100

Re: what is pen, sensing, operators and variables ACTUALLY effect?

ManUguy2001 wrote:

You might have seen with my projects that I don't use a range. Please can someone tell me what they do.

Pen allows you to draw lines(which is useful for making things like a paint application). Sensing allows for basically sensors. It can sense the colour an object is touching, to objects touching each other, operators are for logic operations like adding and subtracting and putting 2 strings(words) together, variables is the word given to a memory location for a certain  quantity or information or a value. For example you may want to make the X-coord of you sprite and double it and save it as a variable to be accessed later. Hope this helped!

Offline

 

#17 2013-01-01 01:58:49

ManUguy2001
Scratcher
Registered: 2012-07-15
Posts: 10

Re: what is pen, sensing, operators and variables ACTUALLY effect?

Thanks again to everyone who posted. I will now try out all of them

Offline

 

Board footer