Hello!
I'm currently developing a RTS game as an hobby and ran into an issue of ordering different units in the game to target other instances that don't match their instances variables.
I have attempted multiple times and couldn't get a script working
When a unit is created they get their team from whatever they are colliding with
I am looking for an example of a script that an instance of a unit that picks other instances of itself that don't match instance variables and order to target automatically.
I'll link some pictures of script i have tried.
Thank you for your time