Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Collision Detecting
- -theGameMaker
-
13 posts
Collision Detecting
So I'm working on a project (Currently shared so you can see https://scratch.mit.edu/projects/975069061/ ), and collision detecting for certain colors isn't working. My code seems fine, but I'm not quite sure. It is in a custom block that has “Run without screen refresh” on, if that changes anything. This is the code:
What I'm trying to do is detect for not touching red. Running it step by step works fine, but all at once gives a different result. The show and hide hitbox broadcasts are showing the map outlines so Scratch can see the colors. The only thing I can think of is that it's sensing for red before it has the hitbox shown, but I can't prove that true or false. If someone could help me out, thanks!
What I'm trying to do is detect for not touching red. Running it step by step works fine, but all at once gives a different result. The show and hide hitbox broadcasts are showing the map outlines so Scratch can see the colors. The only thing I can think of is that it's sensing for red before it has the hitbox shown, but I can't prove that true or false. If someone could help me out, thanks!
- sashimiricedev
-
100+ posts
Collision Detecting
https://scratch.mit.edu/projects/927729774/ This should help with your problem.
- -theGameMaker
-
13 posts
Collision Detecting
https://scratch.mit.edu/projects/927729774/ This should help with your problem.So this doesn't exactly help me because it doesn't use color detection. Thanks for trying though.
- sashimiricedev
-
100+ posts
Collision Detecting
In the “Step Collision” block, find the
blocks and replace them with
blocks. It should work as intended.
- -theGameMaker
-
13 posts
Collision Detecting
I have tried that, but I think I have I identified the problem. I think that the map isn't showing fast enough, but I don't know anyway to fix it. Thanks again for the help though! In the “Step Collision” block, find theblocks and replace them withblocks. It should work as intended.
- Discussion Forums
- » Help with Scripts
-
» Collision Detecting