Discuss Scratch

scratch_master878
Scratcher
39 posts

help please

whenever I run into a wall, it just, gets stuck and stops.
Here is my project: https://scratch.mit.edu/projects/758032168/
Any help appreciated a lot!
DlSCUSS
Scratcher
97 posts

help please

I would recommend making the walls another sprite with the top surface of the wall being in the platformer sprite.
You also need to make separate conditions for the wall sprite in the play sprite.
Itz_Wolfram
Scratcher
66 posts

help please

scratch_master878 wrote:

whenever I run into a wall, it just, gets stuck and stops.
Here is my project: https://scratch.mit.edu/projects/758032168/
Any help appreciated a lot!
The-Molten-Freddy
Scratcher
500+ posts

help please

scratch_master878 wrote:

whenever I run into a wall, it just, gets stuck and stops.
Here is my project: https://scratch.mit.edu/projects/758032168/
Any help appreciated a lot!
It might be this code here.

Instead, try this:
when green flag clicked
forever
if <touching [platform v] ?> then
do whatever you need to get everything back to the starting point, such as sending broadcasts to move certain things
go to [wherever the starting point is v]
end
end
I think that's it.

However, you'll have to make the floor and obstacles different sprites so it actually moves.

If the problem persists, tell me.
scratch_master878
Scratcher
39 posts

help please

For the second solution, it does work, but when I run into a wall, it just puts me on top of it.
Is that because I entered -0.5 in the empty spot you left?
Here is the project that I put the first solution in: https://scratch.mit.edu/projects/759789100/

Last edited by scratch_master878 (Nov. 10, 2022 20:09:13)

scratch_master878
Scratcher
39 posts

help please

For the third solution, yes, I think I know how to sense if it's touching the wall.
But how do I get it out of the wall?
Any help appreciated a lot!
The-Molten-Freddy
Scratcher
500+ posts

help please

scratch_master878 wrote:

For the third solution, yes, I think I know how to sense if it's touching the wall.
But how do I get it out of the wall?
Any help appreciated a lot!
Hold on, what? I'm confused.

Last edited by The-Molten-Freddy (Nov. 14, 2022 15:37:53)

scratch_master878
Scratcher
39 posts

help please

I know how to sense if you are stuck in a wall, but I don't know how to get it back out of the wall.
The-Molten-Freddy
Scratcher
500+ posts

help please

forever
if <touching [wall/obstacles(not floor!) v] ?> then
go to [starting point, wherever that might be v]
do whatever else needs to be done to move things back to the starting point
end
end

Last edited by The-Molten-Freddy (Nov. 15, 2022 15:44:10)

Powered by DjangoBB