Discuss Scratch

Xfaryander
Scratcher
6 posts

race cars go through walls

my game here cars go through walls this is an issue because card don't go through walls can some one help me with making the walls work
Nin100GameronScratch
Scratcher
100+ posts

race cars go through walls

Hello!

I can't guarantee this will work, but maybe try this code and fill in the blanks?

when green flag clicked
if <[x (or y) position)] = []> then
go to x: () y: (0)
end

Nin100Gamer

My PROfile

Hope you all have a great day!

Xfaryander
Scratcher
6 posts

race cars go through walls

hey NinGameron this wont work for the game because of its scrolling nature but good idea and have a awesome day
Nin100GameronScratch
Scratcher
100+ posts

race cars go through walls

Oh okay, I couldn't see the project because it was unshared so I didn't know what style the game was

Nin100Gamer

My PROfile

Hope you all have a great day!

adem_1000
Scratcher
84 posts

race cars go through walls

Xfaryander wrote:

my game here cars go through walls this is an issue because card don't go through walls can some one help me with making the walls work
you can use this script
forever
if <key [up arrow v] pressed?> then
move (1) steps
if <touching [walls v] ?> then
move (-1) steps
end
else
if <key [down arrow v] pressed?> then
move (-1) steps
if <touching [walls v] ?> then
move (1) steps
end
end
end
if <key [left arrow v] pressed?> then
turn ccw (1) degrees
else
if <key [down arrow v] pressed?> then
turn ccw (-1) degrees
end
end
end

Last edited by adem_1000 (Dec. 7, 2021 04:34:50)

real_ender_dragon
Scratcher
61 posts

race cars go through walls

3 things:
1,

Xfaryander wrote:

cars go through walls this is an issue because cars don't go through walls
that sounds weird out of context

2,
you should share the project so we can see it

3,
and make the walls one colour then use the if touching color block


when green flag clicked
render (signature)
Adam-Basha
Scratcher
35 posts

race cars go through walls

The link doesn't open, Scratch can't find it

Hello I am Adam
Please check my profile and follow
link: https://scratch.mit.edu/users/Adam-Basha/
Xfaryander
Scratcher
6 posts

race cars go through walls

ok the project link should work now, i forgot to share it and i am using colors.

Powered by DjangoBB