Discuss Scratch

TosNoom
Scratcher
46 posts

mouse down? block not working

the mouse down block does not work
this is my code

whenIreceivehidden again2foreveriftouchingmouse-pointer?andmousedown?thenifhouselevel=1thensethouse levelto0switchbackdroptodownstairsifhouselevel=0thensethouse levelto1switchbackdroptoupstairs
groggs
Scratcher
100+ posts

mouse down? block not working

Hi there,

It's better to share and provide the link to your project, rather than just a block, I am assuming that its just a problem with broadcasting, are you also sure that the variable is 1 or 0?
crumbthehog
Scratcher
92 posts

mouse down? block not working

TosNoom wrote:

the mouse down block does not work
this is my code

whenIreceivehidden again2foreveriftouchingmouse-pointer?andmousedown?thenifhouselevel=1thensethouse levelto0switchbackdroptodownstairsifhouselevel=0thensethouse levelto1switchbackdroptoupstairs
it doesn't work because if house level = 1, you set it to zero. then right after that it checks if house level = zero. of coarse, it is because you just set it to 0 so it sets it back to one. you need to make it an if else block. I hope that helped.

Powered by DjangoBB