I have turret firing projectiles and I want to destroy oldest projectile if X amount on screen.
I started with an array but couldn't get it to destroy anything. So I searched the forum for help and found this example, but still cant get it to destroy my projectiles. The array seams to work in the debugger If I remove pick instance with UID array.at(number).
Anyone have some idea how to solve this?
Haven't tested the other example with instance variable yet. Which one is best for performance?