Discuss Scratch

Legends_OB
Scratcher
4 posts

My laser in my project is being weird

Hi! In my project https://scratch.mit.edu/projects/1379925565 ive been having issues with the laser when my drone locks on to its target. It is supposed to point directly towards the target, but it would start going off the drone, ive checked all the code and it wouldn't change anything. It all started when I was doing some minor changes to the project. If anyone can take a look through the code, make a remix or show me what they think the problem is or if they did find out what the problem is please let me know.
consonant
Scratcher
79 posts

My laser in my project is being weird

Hi! I just looked through your project and noticed a couple issues:

1. You have two scripts in the Drone1 sprite that are both modifying its movement at the same time. The laser looks like it is sometimes locking on to one of those movements, even though visually we don't see the drone move that way.

2. Your custom script is not defined the way you meant to; you can't use arguments (the input bubbles that you select when making the custom block) outside of the definition!

3. Your exit code was never being reset, so instead of going from 0 (not found) to 1 (found), it just kept getting higher.

I have implemented these changes: https://scratch.mit.edu/projects/1380651262/
along with some comments that should help you out.

Happy Scratching!

Powered by DjangoBB