Discuss Scratch

Makisha123
Scratcher
3 posts

If touching (color, or edge) not working

Hello,

I have some problems with my script. If touching block is not working
<touching color ?><touching ?>. I am making this game where you fight with 2 birds. I want to make them: 1. teleport thru walls to the other side when on the edge, 2. i want to make them die when they touch the ground. Here is the project:

https://scratch.mit.edu/projects/538574572/

Scratch pros, please help. Thank you!

Last edited by Makisha123 (June 1, 2021 16:08:46)

deck26
Scratcher
1000+ posts

If touching (color, or edge) not working

If you only test immediately after clicking the green flag it won't be checking later in the project. You don't seem to have put the code in a loop so it keeps checking.
Makisha123
Scratcher
3 posts

If touching (color, or edge) not working

If i make it infinite then it would make it teleport on edge infinitly
t3nnislord
Scratcher
19 posts

If touching (color, or edge) not working

Just use an if then block, put your color sensing block in, and then put it inside a forever loop!
-Kryptonite-
Scratcher
1000+ posts

If touching (color, or edge) not working

t3nnislord wrote:

Just use an if then block, put your color sensing block in, and then put it inside a forever loop!

foreveriftouchingcolor?thenteleportorwhatever

Powered by DjangoBB