Essentially, I want it to do something once the player is within a certain radius of it.
I planned to use an Invisible sprite that is larger than the enemy; then, when the player touches it, the enemy does something. However, the problem with that was that it wouldn’t affect the enemy that is on top of the larger sprite; instead, it would perform that action on a random enemy of the same type.
The reason it’s performing on a random enemy is most likely because you are using the variable that you used to spawn the enemy, for example when using the code “set [fire] to (create enemy…)” the “fire” variable is the one you are using, but once you make more than one sprite, that variable only effects the most recent enemy created. I suppose if you spawned the enemies and their hitboxes in the same order, you could use that order in the “array of all sprite of kind…” block to tell which hitbox belongs to which sprite, but that’s a bit complicated and, depending on how you are using sprite types, etc, it may not work for you. The simplest solution I can think of is to make your own hitbox code that loops through each sprite and checks if one of the other things is within a certain x/y range of the sprite. That way you wouldn’t be using additional sprites just as hitboxes, which is a very resource intensive way of doing something that could be a lot less laggy when done another way.