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

#1 2011-01-22 20:59:02

shiann
New Scratcher
Registered: 2011-01-22
Posts: 1

Newbie Needing Some Help Please :3

I do not understand variables... At all. I have no idea what they're for, or what they do.

And for that matter, I'd like to learn to make a horse turn -> when I push the arrow that reads -> but it is still turned <- when I push -> and it's going ->. (That's the best way I know how to explain it.)

I'm trying to make a horse Sim... A bit like the dog that comes with the system as an example, but different in many ways.

Hmm... All I got for now.

Thanks for reading!

~s

Offline

 

#2 2011-01-22 22:46:16

00absol
Scratcher
Registered: 2011-01-16
Posts: 11

Re: Newbie Needing Some Help Please :3

have u tried flipping the image in edit costume?

Offline

 

#3 2011-01-24 17:23:01

Nano511
Scratcher
Registered: 2011-01-20
Posts: 39

Re: Newbie Needing Some Help Please :3

Variables are place holders, Just like variables in math.

Maybe try doing

Forever
If <right key pressed?>
    switch to costume (whatever the sideways horse is)

Offline

 

#4 2011-01-24 18:53:53

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: Newbie Needing Some Help Please :3

This topic might be able to help you learn a bit more about variables..  smile , as for the turning problem, try going to the sprite and clicking this button at the top of the script area.

http://i404.photobucket.com/albums/pp129/06dknibbs/Flipping.png

Then add these blocks to whichever scripts you're using to move the horse:
[blocks]

<point in direction( 90 ) right

or

<point in direction( -90 ) left

[/blocks]

Last edited by 06dknibbs (2011-01-24 19:03:54)


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#5 2011-01-25 00:14:21

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Newbie Needing Some Help Please :3

shiann wrote:

I do not understand variables... At all. I have no idea what they're for, or what they do.

Try looking at this Scratch Wiki article  smile


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#6 2011-01-25 18:50:09

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Newbie Needing Some Help Please :3

Variables just let you store values for later use, or even in different sprites. For example, you could have a script that asks for input, and then says what you said back.

Code:

When green flag clicked
Ask "Say something!" and wait
Set {variable name} to {answer}
Say {variable name} for two seconds

http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#7 2011-01-26 22:00:33

Dinoclor
Scratcher
Registered: 2010-06-10
Posts: 1000+

Re: Newbie Needing Some Help Please :3

Variables are useful for lots of stuff. If you want to use one number over and over, create a variable, set the variable to your number, and use the variable instead of the number. That way, if you want to change the number that you use, all you have to do is change the number the variable is set to.


This is a temporary signature. It will exist until I think of something witty.

Offline

 

Board footer