Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do i change the backdrop when my variable reaches a certain number.
- TheReptileGirl
-
4 posts
How do i change the backdrop when my variable reaches a certain number.
I need a little help.
Im making a frog chase game, and im adding levels.
I have tried recomended ways but none work.
can someone help me out?
I have tried looking it up but i got no luck, and its bothering me, because im very stubborn, and when i cant get something to be a perfect way i get upset VERY easily. Thanks for your consideration
]
Im making a frog chase game, and im adding levels.
I have tried recomended ways but none work.
can someone help me out?
I have tried looking it up but i got no luck, and its bothering me, because im very stubborn, and when i cant get something to be a perfect way i get upset VERY easily. Thanks for your consideration
![](http://cdn.scratch.mit.edu/scratchr2/static/__238e692fba4864e9ff337c17d8a4033d__/djangobb_forum/img/smilies/wink.png)
- awesome-llama
-
1000+ posts
How do i change the backdrop when my variable reaches a certain number.
when [variable v] > (10)It can be as simple as that, Edit: It turns out this does not work. Use the below.
switch backdrop to [example backdrop v]
[…] but the way this is scripted depends on its use case. If you only wanted it to be triggered once, try:
when green flag clicked
wait until <(variable) > [10]>
switch backdrop to [example backdrop v]
Last edited by awesome-llama (Feb. 20, 2020 12:49:51)
- TheReptileGirl
-
4 posts
How do i change the backdrop when my variable reaches a certain number.
when [variable v] > (10)It can be as simple as that, but the way this is scripted depends on its use case. If you only wanted it to be triggered once, try:
switch backdrop to [example backdrop v]when green flag clicked
wait until <(variable) > [10]>
switch backdrop to [example backdrop v]
thanks
- TheReptileGirl
-
4 posts
How do i change the backdrop when my variable reaches a certain number.
it didnt work just nowwhen [variable v] > (10)It can be as simple as that, but the way this is scripted depends on its use case. If you only wanted it to be triggered once, try:
switch backdrop to [example backdrop v]when green flag clicked
wait until <(variable) > [10]>
switch backdrop to [example backdrop v]
- awesome-llama
-
1000+ posts
How do i change the backdrop when my variable reaches a certain number.
Can you share the scripts of your project or give a link? it would be much easier for me to find the issues and help you.it didnt work just nowwhen [variable v] > (10)It can be as simple as that, but the way this is scripted depends on its use case. If you only wanted it to be triggered once, try:
switch backdrop to [example backdrop v]when green flag clicked
wait until <(variable) > [10]>
switch backdrop to [example backdrop v]
Last edited by awesome-llama (Jan. 27, 2019 05:29:17)
- qqqwwweeerrrtttt1
-
3 posts
How do i change the backdrop when my variable reaches a certain number.
if its in a forever/repeat then it could stop your script.
instead try this:
instead try this:
forever
if <[var] > [10]> then
switch backdrop to [ 2]
end
end
- deck26
-
1000+ posts
How do i change the backdrop when my variable reaches a certain number.
Avoid switching backdrops repeatedly in a loop unnecessarily though. Better to use wait untils if you want it to happen more than once. if its in a forever/repeat then it could stop your script.
instead try this:forever
if <[var] > [10]> then
switch backdrop to [ 2]
end
end
forever
wait until <<(var) > [10]> and <not <(backdrop #) = [2]>>
switch backdrop to [ 2]
end
Last edited by deck26 (Jan. 27, 2019 13:32:55)
- amster11722
-
100+ posts
How do i change the backdrop when my variable reaches a certain number.
Orrrrrr this:
forever
if <<(var) > [10]> and <(var) < [12]>> then
switch costume to [costume 2 v]
else
switch costume to [costume 1 v]
end
end
Last edited by amster11722 (Jan. 27, 2019 13:44:57)
when gf clicked
broadcast[WAKE UP!!! v]
when i receive [WAKE UP!!! v]
switch costume to[clothes v]
go to x: [https://scratch.mit.edu/discuss/] y: [Help With Scripts]
- Topaz_Genie
-
1 post
How do i change the backdrop when my variable reaches a certain number.
when [variable v] > (10)It can be as simple as that, but the way this is scripted depends on its use case. If you only wanted it to be triggered once, try:
switch backdrop to [example backdrop v]when green flag clicked
wait until <(variable) > [10]>
switch backdrop to [example backdrop v]
doesn't work?
the ‘when variable > 10’ block doesn't exist?
Last edited by Topaz_Genie (Feb. 20, 2020 12:15:04)
- awesome-llama
-
1000+ posts
How do i change the backdrop when my variable reaches a certain number.
I just checked, and it does but not in the way I put it. I made a mistake and thought that variables could go into there. Just use the script below it.when [variable v] > (10)It can be as simple as that, but the way this is scripted depends on its use case. If you only wanted it to be triggered once, try:
switch backdrop to [example backdrop v]when green flag clicked
wait until <(variable) > [10]>
switch backdrop to [example backdrop v]
doesn't work?
the ‘when variable > 10’ block doesn't exist?
I will edit the other posts to fix the error.
Edit: Maybe hacked blocks or previous versions of scratch could do something similar with that block. I don't know for sure, though.
Last edited by awesome-llama (Feb. 20, 2020 12:51:08)
- fghdjsb
-
7 posts
How do i change the backdrop when my variable reaches a certain number.
hey llama your codes dont work
- GreysonTheChickenxD
-
1 post
How do i change the backdrop when my variable reaches a certain number.
good job ![](//cdn.scratch.mit.edu/scratchr2/static/__867ec47c1657f9fde21932c086a84195__/djangobb_forum/img/smilies/smile.png)
![](http://cdn.scratch.mit.edu/scratchr2/static/__867ec47c1657f9fde21932c086a84195__/djangobb_forum/img/smilies/smile.png)
- DerpyHead0
-
1000+ posts
How do i change the backdrop when my variable reaches a certain number.
please don't necropost, this thread is more than a year old and you haven't said anything relevant. good job
when I start as a clone
delete this clone
- Qs_C23
-
1 post
How do i change the backdrop when my variable reaches a certain number.
Thank you llama, I put your name in the credits of my game check it out: https://scratch.mit.edu/projects/486306778/
- SaravanaNaveen
-
3 posts
How do i change the backdrop when my variable reaches a certain number.
Me Too
- SaravanaNaveen
-
3 posts
How do i change the backdrop when my variable reaches a certain number.
Pls Give and Idea
- SaravanaNaveen
-
3 posts
How do i change the backdrop when my variable reaches a certain number.
How Do You Even Get Variable Option Cause Am Not Getting It…………
- amazingscratchcoder
-
100+ posts
How do i change the backdrop when my variable reaches a certain number.
And This is what you call necroposting
https://scratch.mit.edu/discuss/topic/607671/ - We're a group of passionate musicians who'd like to share our music with others. Want original, personalized, diverse music, and really fast? Order now at the Piano Shop!
- Discussion Forums
- » Help with Scripts
-
» How do i change the backdrop when my variable reaches a certain number.