Okay so this might be a tough one to explain so bear with me.
I'm currently working on a game where Zombies will be created when the frame starts, I haven't set that part up yet as it's still early on but I've been learning about giving Objects separate ID's so that the Zombies are all individual.
I looked at a few tutorials here and there and ended up settling with this tutorial: https://www.youtube.com/watch?v=Zz4YbXj2ooc&
His example worked fine and I can replicate it fine but I've had some problems.
So the Zombies work exactly the way they should, they both have individual health and do their own thing however I've got a system in place where the Zombies will detect you if the player object is overlapped by a trigger object that is always stuck to the Zombie and follows what direction he is looking.
I've had to give those trigger objects their own ID's too, which appears to work the way I want it too, all the way up until I need to actually destroy the object once the Zombie it's attached too is dead.
It's a bit confusing for me to diagnose but it has it's own Global Value which right now is set to update to the Trigger objects own ID Alterable Value whenever I click one of the trigger objects.
Now I've got it working so that when one of the triggers is destroyed, the other doesn't, however it doesn't seem to matter what I do, when I destroy one of them, it's only the first trigger object that was created into the frame that goes. If it's that one I'm targeting to destroy then it works perfectly fine but if I try to destroy the second one it destroys the first one instead.
I cannot for the life of me figure out why this is and would appreciate any help.
I can't seem to attach my actual game MFA because it's too big but I've attached a smaller example MFA that basically shows what I'm doing in my actual game MFA to spread the ID's.
I'd also like to quickly add that when Zombies die, they individually get destroyed like they should, which is why this is so confusing to me because to me I've set the trigger object up the exact same way as the Zombies, yet it's not destroying the same way.
Would seriously appreciate any tips or advice here, been stuck on this for a while now and just can't figure it out.