In my game I have an enemy that I have follow me when my player gets close enough and attack when my player is really close. Everything works fine for a single enemy. I want multiple enemies of the same type on my level so I cloned several copies of them but when I play my game enemy behaviors are not consistent; different enemies will do actions that do no coincide with where my player is. For example, I may be close to enemy 1 but enemy 3 will be the one that moves toward me, or enemy 2 will attack even though enemy 1 is close to me. Do cloned objects all share the same values of each number, switch positions, etc?
Or maybe it's a problem with my code. Currently my player will send his position to every enemy object every second. Then in my enemy I have mailboxes with those coordinates that go to a switch, then a point-at, then velocity but the switch is only turned on when in proximity of the player. So while the players coordinates are updated every second, the switch should on turn on to actually let the enemy act on those coordinates when in the proximity of the player.