Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » race cars go through walls
- 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?
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
- 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
- adem_1000
- Scratcher
84 posts
race cars go through walls
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 workyou can use this script my game
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,
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
1,
that sounds weird out of context cars go through walls this is an issue because cars don't go through walls
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
- 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.
- Discussion Forums
- » Help with Scripts
- » race cars go through walls