Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to make collisions with invisible walls
- menikin1
-
48 posts
how to make collisions with invisible walls
I am trying to get my sprite to stop going through my walls. It has to be invisible or else it looks weird. Thanks.
- Uniquename1
-
100+ posts
how to make collisions with invisible walls
If touching sprite or color should both work even if ghost effect is set to 100.
Alternatively if the walls are on the border that the sprite can't go out of then
With this he will only move up to about 200, then if he's further over than that he won't move anymore to the right. Essentially like hitting a wall.
Alternatively if the walls are on the border that the sprite can't go out of then
With this he will only move up to about 200, then if he's further over than that he won't move anymore to the right. Essentially like hitting a wall.
- Pezd
-
100+ posts
how to make collisions with invisible walls
The trick is that the sensing block
still works when ‘sprite6’ has the ghost effect turned all the way.
- cs641311
-
100+ posts
how to make collisions with invisible walls
Try setting the color of the invisable walls to the color of the background that will make the wall seem invisable.
- -Nostalgic-
-
6 posts
how to make collisions with invisible walls
Instead of using the hide block, use I am trying to get my sprite to stop going through my walls. It has to be invisible or else it looks weird. Thanks.

- menikin1
-
48 posts
how to make collisions with invisible walls
The trick is that the sensing blockstill works when ‘sprite6’ has the ghost effect turned all the way.
How do I make it not go through though?
- PhoenixDragonBlue
-
100+ posts
how to make collisions with invisible walls
Write this in the wall script :
Also, when making the
and this in the object to be blocked by the wall's script:
You may have to replace
to
depending on which side the wall is on.
Also, when making the
be sure to check the “Run Without Screen Refresh” box.
- menikin1
-
48 posts
how to make collisions with invisible walls
Write this in the wall script :and this in the object to be blocked by the wall's script:You may have to replacetodepending on which side the wall is on.
Also, when making thebe sure to check the “Run Without Screen Refresh” box.
Thanks, this worked.
- PhoenixDragonBlue
-
100+ posts
how to make collisions with invisible walls
No problem-snip-
Thanks, this worked.

- Discussion Forums
- » Help with Scripts
-
» how to make collisions with invisible walls