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

#1 2011-03-01 19:08:13

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

How would I make an object check if a variables value changed?

I want an object to move to another position if a variable's value changes to a specific value?

Offline

 

#2 2011-03-01 19:14:16

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: How would I make an object check if a variables value changed?

I mean:
I want an object to move to another position if a variable's value changes to a specific value. How woud I do that?

Offline

 

#3 2011-03-01 19:39:38

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: How would I make an object check if a variables value changed?

Use:

if variable = number
{
Do stuff here, like change position.
}


Hai.

Offline

 

#4 2011-03-01 20:14:52

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: How would I make an object check if a variables value changed?

How would I do the if variable = number? Wuld it be like this?:
[blocks]
<when green flag clicked>
<forever if<(  <Level=1>  )>>
<go to x sad   50)y sad  20)>
<end>

Offline

 

#5 2011-03-01 20:22:55

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: How would I make an object check if a variables value changed?

[blocks]
<when green flag clicked>
<forever if<(  <Level=1>  )>>
<go to x sad  12)y sad  44
<end>

Offline

 

Board footer