Discuss Scratch

xXsurvivalistXx
Scratcher
17 posts

Sprite collision when touched to an obstacle.

In my project, I am creating a game called Splatoon(still in beta). But how do i make a sprite preventing from going through an obstacle? If you want to view the project, here is the link: https://scratch.mit.edu/projects/318758203/
whiteandblackcat
Scratcher
1000+ posts

Sprite collision when touched to an obstacle.

in the scripts for the players, when they move, the script should be this:
if <key [w v] pressed?> then
move (2) steps
if <touching [obstacle v] ?> then
move (-2) steps
end
end
xXsurvivalistXx
Scratcher
17 posts

Sprite collision when touched to an obstacle.

whiteandblackcat wrote:

in the scripts for the players, when they move, the script should be this:
if <key [w v] pressed?> then
move (2) steps
if <touching [obstacle v] ?> then
move (-2) steps
end
end

k thanks
Nambaseking01
Scratcher
1000+ posts

Sprite collision when touched to an obstacle.

xXsurvivalistXx wrote:

~snip~
k thanks

Please close the thread if your problem has been solved to prevent spam and necroposts. Thank you!

Last edited by Nambaseking01 (July 12, 2019 13:37:17)

Powered by DjangoBB