I just realized that it applies to a single instance by this: const player = objects; This applies to the first instance of the scene, but if I put: const player = objects; It refers to the second instance, so how do I apply this to all instances of the object?
I’d suggest checking out the ‘Javacript blocks in platformer’ example. It should run through what you want within the enemies management section. (loops through objects, sets behaviors/opacity/etc).
You’ll still need to get/set your variables within the forEach().
I already reviewed this example, and I learned a few things, but what I want is to apply actions to all instances of the object
I’m going to try to use foreach to see how it goes and thanks for the advice