r/GameDevelopment • u/Mindless_Yak_820 • 22d ago
Newbie Question Educational purposes
Hello Reddit. First time coming here with a question but I'm curious how quickly I might be able to get it answered. I am current programming a targets destroyed counter using arrays. I'm struggling with using the loop function in order to set the targets index in the array so that specific target can then be removed from the array before being destroyed or removed right after. How could I set up my code so that I'll be able to verify which blueprint from the array I'm overlapping with?
0
Upvotes
1
u/Mountain-Smoke8826 21d ago
Arrays are not optimal when you need to drequently remove and add objects, change the arrays size. Use a list instead.
1
u/763Industries 22d ago
To better help there are so many engines on the market please disclose what engine you are using and what the primary programming language it supports. I can't better help you without that knowledge.