Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » checking for moving off screen
- jasione
-
6 posts
checking for moving off screen
i am copying a game from the carol vorderman book “monkey mayhem” i would like to extend it to play a wack wack oops style sound when the bananas go off the top of the screen.
I could find when touch edge bounce, but i only want it for the top. and i tried to use the y position but that always played.
here is my imgur page with the screenprint uploaded (sorry the link thingy wasn't working)
http://imgur.com/a/MOzm0
edit trying to get the link to work
I could find when touch edge bounce, but i only want it for the top. and i tried to use the y position but that always played.
here is my imgur page with the screenprint uploaded (sorry the link thingy wasn't working)
http://imgur.com/a/MOzm0
edit trying to get the link to work
Last edited by jasione (Oct. 7, 2016 13:21:01)
- deck26
-
1000+ posts
checking for moving off screen
Can't tell much from that image - can you share the project?
- PowerconTeaching
-
9 posts
checking for moving off screen
You just need to use
However it is best the when needing help you share the project, it lets people have a look at the code and test it. You can unshare it after.
However it is best the when needing help you share the project, it lets people have a look at the code and test it. You can unshare it after.
- jasione
-
6 posts
checking for moving off screen
I had that, but it made the noise every time, even when I hit the bat.
well here it is shared
https://scratch.mit.edu/projects/124867896/
well here it is shared
https://scratch.mit.edu/projects/124867896/
- PowerconTeaching
-
9 posts
checking for moving off screen
Oh, that is because even though you hide you keep moving and hit the edge. I had that, but it made the noise every time, even when I hit the bat.
well here it is shared
https://scratch.mit.edu/projects/124867896/
- jasione
-
6 posts
checking for moving off screen
i thought that might be it (on the way home) so more code needed in the hit section.
Thanks
Thanks
- jasione
-
6 posts
checking for moving off screen
Thanks PowerCon, i needed a few more events (well i went a bit event crazy) and another couple of variables.
Have i stopped the bananas in the best way?
it felt long winded but I couldn't find a repeat until interupt (but going to look right now)
There is currently a finished version
Have i stopped the bananas in the best way?
it felt long winded but I couldn't find a repeat until interupt (but going to look right now)
There is currently a finished version
- Discussion Forums
- » Help with Scripts
-
» checking for moving off screen