Discuss Scratch

GGking07
Scratcher
21 posts

touching the mouse breaks the game?

so in my game your mouse makes a pen and you have to use that to complete the platformer simply right? the problem is that for some odd reason if touching the mouse it breaks the player, no moving and falls through the pen, here is the game for a better understanding! https://scratch.mit.edu/projects/634274267
fath11
Scratcher
100+ posts

touching the mouse breaks the game?

I am not sure what the problem is with the mouse but I found another problem in your player sprite



the set LEVEL# var should go with the when green flag is clicked and the go-to x: y: block should go inside the Tick last Broadcast and also change the y: value to be 120



and I also think you should put erase all in the Pen sprite
Jay29837
Scratcher
56 posts

touching the mouse breaks the game?

GGking07 wrote:

so in my game your mouse makes a pen and you have to use that to complete the platformer simply right? the problem is that for some odd reason if touching the mouse it breaks the player, no moving and falls through the pen, here is the game for a better understanding! https://scratch.mit.edu/projects/634274267
It's not necessarily touching the brush, it's when you clicked on the player with the brush because the player gets stuck in the ground. That would explain the not-moving, but what do you mean falls through the pen? That does not happen for me.
Also, additionally to what @fath11 said, you should add
when I receive [ next level]
go to x: (start of level x) y: (start of level y)

Last edited by Jay29837 (Jan. 29, 2022 01:43:32)

fath11
Scratcher
100+ posts

touching the mouse breaks the game?

Jay29837 wrote:

(#3)

GGking07 wrote:

so in my game your mouse makes a pen and you have to use that to complete the platformer simply right? the problem is that for some odd reason if touching the mouse it breaks the player, no moving and falls through the pen, here is the game for a better understanding! https://scratch.mit.edu/projects/634274267
It's not necessarily touching the brush, it's when you clicked on the player with the brush because the player gets stuck in the ground. That would explain the not-moving, but what do you mean falls through the pen? That does not happen for me.
Also, additionally to what @fath11 said, you should add
when I receive [ next level]
go to x: (start of level x) y: (start of level y)

that is the same as adding just a
go to x: () y: (0)

Last edited by fath11 (Jan. 29, 2022 01:46:40)

GGking07
Scratcher
21 posts

touching the mouse breaks the game?

alright i'll try that
GGking07
Scratcher
21 posts

touching the mouse breaks the game?

Jay29837 wrote:

GGking07 wrote:

so in my game your mouse makes a pen and you have to use that to complete the platformer simply right? the problem is that for some odd reason if touching the mouse it breaks the player, no moving and falls through the pen, here is the game for a better understanding! https://scratch.mit.edu/projects/634274267
It's not necessarily touching the brush, it's when you clicked on the player with the brush because the player gets stuck in the ground. That would explain the not-moving, but what do you mean falls through the pen? That does not happen for me.
Also, additionally to what @fath11 said, you should add
when I receive [ next level]
go to x: (start of level x) y: (start of level y)

what happens is that if the character is on the pen and the paint brush hovers over the player the player falls through the pen
GGking07
Scratcher
21 posts

touching the mouse breaks the game?

alright i fixed it by making the paintbrush a different color, now ill just fix the outline on the level
GGking07
Scratcher
21 posts

touching the mouse breaks the game?

actually the problem still happens, if I am on a drawn pen and the player is touched by the pen the player goes down and gets stuck in the pen, is there a way to fix this problem?
GGking07
Scratcher
21 posts

touching the mouse breaks the game?

GGking07 wrote:

actually the problem still happens, if I am on a drawn pen and the player is touched by the pen the player goes down and gets stuck in the pen, is there a way to fix this problem?
wait I found out the problem, so the paintbrush is covering the pen so the player can no longer touch the pen, I guess I have to remove the paintbrush costume

Powered by DjangoBB