I'm also new to this but I think all you have to do is broadcast a message when your variable turns 20 and program the background to change when it recieves that message. Hope this helps!
Offline
broadcast is unessasry. on the background
<when green flag clicked>
<forever>
<if><( <{VAR }><=> 20 )>
<switch to background[ what ever you want
<end>
<end>
Scratch is NOT confusing, you just need to look at the code. in word what would you say you want done? if variable is 20 change background, that is exactly what i did except change it a bit to match the scripting
Offline
Maybe a dumb question and easy to test later but if a variable is private to a sprite can the stage "see" it?
Offline
BTY I used to live in Canada, pretty far from you though ( New Brunswick).
Miss the snow.
Hope to upload interesting program soon.
Trying to simulate an editor.
Thanks again!
Offline
Iris_Sophia wrote:
Maybe a dumb question and easy to test later but if a variable is private to a sprite can the stage "see" it?
Actually, yes it can! It can use the special Sensing block which reports the values of sprite attributes and local (or private) variables. Look in the Sensing tab for a block that has two drop-down menus separated by the word "of". Using this block really increases the usefulness of local sprite-specific variables. You can look at (but not change) the value of any sprite's local variables from any other sprite or the stage. In fact, you probably should make most of your variables local unless you really need to be able to change the value from some other sprite.
Offline
Appreciate answers.
mrweston: I miss snow but only some the time LOL.
Paddle2See: Thanks, I checked out the Sensing tab.
Offline
Hey, that's some helpful info, Paddle2See -- thanks for that! Hadn't ever used that block to access variables... I can see how it would make local variables more useful than otherwise. Will be reworking my approaches from now on!
Offline
Jello715 wrote:
yambanshee wrote:
Scratch is NOT confusing,
Opinion
![]()
Yeah, just try using some real languages then say that. You learn variables in 6th grade math. If you know 6th grade math then you should be able to use scratch without any other programming experience.
Scratch is as easy as it gets.
Offline
archmage wrote:
Jello715 wrote:
yambanshee wrote:
Scratch is NOT confusing,
Opinion
![]()
Yeah, just try using some real languages then say that. You learn variables in 6th grade math. If you know 6th grade math then you should be able to use scratch without any other programming experience.
Scratch is as easy as it gets.
QFT!
(haha, bringing back an old tradition)
But yes, you do learn variables in grade six math (or you're supposed to... If you aren't your teacher is forgetting to teach you a life-changing lesson, because by the time you get into G8M, you're going to die if you don't know what a variable is.)
Offline
coolstuff wrote:
archmage wrote:
Jello715 wrote:
Opinion![]()
Yeah, just try using some real languages then say that. You learn variables in 6th grade math. If you know 6th grade math then you should be able to use scratch without any other programming experience.
Scratch is as easy as it gets.QFT!
(haha, bringing back an old tradition)
But yes, you do learn variables in grade six math (or you're supposed to... If you aren't your teacher is forgetting to teach you a life-changing lesson, because by the time you get into G8M, you're going to die if you don't know what a variable is.)
lol we did variables in 4th grade...
Offline