Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » If/Else Block doesn´t works
- Mart2313
- Scratcher
9 posts
If/Else Block doesn´t works
Hello.
I have a problem with this block. When I Put:
when i press the key the costume changes (to “run”) but when i don´t press the key any more the costume doesn´t changes(still the costume “run”) and it is like if i am pressing the key still.
Any idea about why it happens?
I have a problem with this block. When I Put:
when green flag clicked
if <key [ v] pressed?> then
switch costume to [ v]
end
else
switch costume to [ v]
when i press the key the costume changes (to “run”) but when i don´t press the key any more the costume doesn´t changes(still the costume “run”) and it is like if i am pressing the key still.
Any idea about why it happens?
- drmcw
- Scratcher
1000+ posts
If/Else Block doesn´t works
You need a forever loop around your script otherwise it will just run once and end.
- Mart2313
- Scratcher
9 posts
If/Else Block doesn´t works
Thank you so much, it works now. You need a forever loop around your script otherwise it will just run once and end.
- Discussion Forums
- » Help with Scripts
- » If/Else Block doesn´t works