Hey guys ive got abit of annoying issue i cant work out. i have a creature of the screen which is the object that holds all my variables etc. so the problem is when i create these creatures i send them moving right and they overlap an object which i call fire zone which causes the sniper to attack them. but the problem ive got is that when they are overlapping the sniper shoots the creature off the screen and not the closest one in the overlapping area. please help this problem has completely stopped me in my tracks
Ahh... very simple. The Bullet onCreated is confused which zombie it should target. It will pick the last zombie that spawned. Best is to set the bullet straight away after it was created, instead of on Bullet OnCreated event.
Hahaha, no worries. Glad I could help. Anyway, just note that when you detect on collision, the object that involved with the collision will be the focused instance. All actions in that event will affect the two collided instances by default.