Discuss Scratch

jasione
Scratcher
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

Last edited by jasione (Oct. 7, 2016 13:21:01)

deck26
Scratcher
1000+ posts

checking for moving off screen

Can't tell much from that image - can you share the project?
jasione
Scratcher
6 posts

checking for moving off screen

Once i work out how I will.
PowerconTeaching
Scratcher
9 posts

checking for moving off screen

You just need to use
ifyposition>179then

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
Scratcher
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/
PowerconTeaching
Scratcher
9 posts

checking for moving off screen

jasione wrote:

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/
Oh, that is because even though you hide you keep moving and hit the edge.
jasione
Scratcher
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
jasione
Scratcher
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

Powered by DjangoBB