Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Code is not working! Help!
- Happy_AlexRO
-
Scratcher
7 posts
Code is not working! Help!
Hi! I'm having trouble with the code of a game I'm working on. I was trying to add something to my new game but instead, I accidentally changed the code of another sprite and I don't know what the code was.
https://scratch.mit.edu/projects/555786968/
It's supposed to open the GlassInfo tab when double clicked, but seems that only dragging works. I'm sure there are no variables or custom blocks needed because I 100% remember that I didn't use these!
https://scratch.mit.edu/projects/555786968/
It's supposed to open the GlassInfo tab when double clicked, but seems that only dragging works. I'm sure there are no variables or custom blocks needed because I 100% remember that I didn't use these!
- Thingied
-
Scratcher
1000+ posts
Code is not working! Help!
(this is just a fix for the window not opening problem)
Problem was that it waited until the mouse was not being held down then skipped past the statements. Why? Because they will never be true. It waits until the mouse isn't being held down but in the same frame checks to see if it is being held down after. The fix is to just use wait until <> so it pauses the entire script until the mouse is being held down again.

Problem was that it waited until the mouse was not being held down then skipped past the statements. Why? Because they will never be true. It waits until the mouse isn't being held down but in the same frame checks to see if it is being held down after. The fix is to just use wait until <> so it pauses the entire script until the mouse is being held down again.

- Happy_AlexRO
-
Scratcher
7 posts
Code is not working! Help!
(this is just a fix for the window not opening problem)
Problem was that it waited until the mouse was not being held down then skipped past the statements. Why? Because they will never be true. It waits until the mouse isn't being held down but in the same frame checks to see if it is being held down after. The fix is to just use wait until <> so it pauses the entire script until the mouse is being held down again.
I put a “Wait until mouse down” between the Bin mechanism and the mouse mechanism and it now works! thanks!
- Discussion Forums
- » Help with Scripts
-
» Code is not working! Help!