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

#1 2012-04-12 16:12:12

PretVlek
New Scratcher
Registered: 2012-02-04
Posts: 3

variables

Hi,

Is it possible to subtract the value of a variable with the value of an other variable, and put this result in an other variable?

Offline

 

#2 2012-04-12 16:16:06

pi3
Scratcher
Registered: 2011-12-31
Posts: 500+

Re: variables

Yes.

set [variable 3] to < (variable 1) - (variable 2) >
Hope I helped!  smile

Last edited by pi3 (2012-04-12 16:17:29)


http://i44.tinypic.com/ofdhc4.jpgThanks FreshStudios!

Offline

 

#3 2012-04-12 16:20:03

PretVlek
New Scratcher
Registered: 2012-02-04
Posts: 3

Re: variables

Yes, very helpful thanks.

Offline

 

#4 2012-04-12 16:21:17

brettman98
Scratcher
Registered: 2010-10-17
Posts: 1000+

Re: variables

pi3 wrote:

Yes.

set [variable 3] to < (variable 1) - (variable 2) >
Hope I helped!  smile

or

change [variable 3] by <(variable 1)-(variable 2)>
if you want variable 3 to be modified and not completely changed  smile


http://i40.tinypic.com/n1wbr7.jpg

Offline

 

#5 2012-04-12 16:33:52

pi3
Scratcher
Registered: 2011-12-31
Posts: 500+

Re: variables

PretVlek wrote:

Yes, very helpful thanks.

You're welcome.  smile


http://i44.tinypic.com/ofdhc4.jpgThanks FreshStudios!

Offline

 

Board footer