Hello,
I am trying to make a project where you have spaceships with a set range of movement.
All the ships are part of a family called "units", and inherit an instance variable for range from it.
In the code, i compare distance from its starting position.
As long as it stays within the parameters, it moves freely to wherever you clicked.
Here is a screenshot.
The issue that keeps occurring is that when I tweaked the code, either all the ships stayed in the smallest range, or only one of each object type under the family stays in its own range.
I suspect that the issue is related to the family that all the ships are under "Units".
any suggestions on how to fix this?
Thank you all so much