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

#1 2012-02-24 13:46:20

k4den
Scratcher
Registered: 2012-01-25
Posts: 9

variable help wanted!

how do I program variables?

Offline

 

#2 2012-02-24 13:51:04

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: variable help wanted!

What do you mean by "program"?
Well if you mean how to script a variable box, you can't script variable box's.  hmm


6418,

Offline

 

#3 2012-02-24 14:00:24

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: variable help wanted!

Can you be more specific?


Why

Offline

 

#4 2012-02-24 16:12:01

k4den
Scratcher
Registered: 2012-01-25
Posts: 9

Re: variable help wanted!

CheeseMunchy wrote:

What do you mean by "program"?
Well if you mean how to script a variable box, you can't script variable box's.  hmm

[scratchblocks}
(something)//are you saying these things are completely USELESS!?!?!?

Offline

 

#5 2012-02-24 16:33:35

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: variable help wanted!

Sorry, I still don't understand completely what you need help with. Is it putting variables into the forum blocks?


Why

Offline

 

#6 2012-02-24 16:46:16

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: variable help wanted!

k4den wrote:

CheeseMunchy wrote:

What do you mean by "program"?
Well if you mean how to script a variable box, you can't script variable box's.  hmm

[scratchblocks}
(something)//are you saying these things are completely USELESS!?!?!?

Noo they are extremely useful.
You just can't program their boxes to move or anything. :p
You change a variable's value by using these blocks:

set [variable v] to [0]
change [variable v] by [1]


6418,

Offline

 

#7 2012-02-25 16:39:08

ftf841
Scratcher
Registered: 2012-02-19
Posts: 1000+

Re: variable help wanted!

you can use them to create a scoring system like this
[scratchblocks]
when space key pressed
if touching sprite 1
    change sprite 1 by -1
end


http://mag.racked.eu/cimage/i9002/Achievement++get%21/Hi+there./mca.png
http://mag.racked.eu/mcimage/i354/Achievement++get%21/CAKE%21%21%21%21%21/mca.png

Offline

 

#8 2012-02-25 16:43:39

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: variable help wanted!

ftf841 wrote:

you can use them to create a scoring system like this

when space key pressed
if touching sprite 1
    change sprite 1 by -1


Get ready for domination of:  tongue

Offline

 

#9 2012-02-25 17:16:47

ProgramCAT
Scratcher
Registered: 2011-12-13
Posts: 500+

Re: variable help wanted!

You could be a little more specific in your requests.


Programming is an art...
Goodbye, Scratch. I am leaving because of the exams coming up at our school, though I'll check the forums once or twice a week.

Offline

 

#10 2012-03-13 18:51:12

ftf841
Scratcher
Registered: 2012-02-19
Posts: 1000+

Re: variable help wanted!

ftf841 wrote:

you can use them to create a scoring system like this
[scratchblocks]
when space key pressed
if touching sprite 1
    change sprite 1 by -1
end

sorry I messed up on the scratch blocks


http://mag.racked.eu/cimage/i9002/Achievement++get%21/Hi+there./mca.png
http://mag.racked.eu/mcimage/i354/Achievement++get%21/CAKE%21%21%21%21%21/mca.png

Offline

 

#11 2012-03-14 16:46:58

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: variable help wanted!

CheeseMunchy wrote:

k4den wrote:

CheeseMunchy wrote:

What do you mean by "program"?
Well if you mean how to script a variable box, you can't script variable box's.  hmm

[scratchblocks}
(something)//are you saying these things are completely USELESS!?!?!?

Noo they are extremely useful.
You just can't program their boxes to move or anything. :p
You change a variable's value by using these blocks:

set [variable v] to [0]
change [variable v] by [1]

Thy are SSOOOOOOOOOPOO USEFUL! there are some difficult scripts that hidden variables can sometimes fix

Offline

 

Board footer