case : i have one sprite with instance variable (name), when the sprite is create, this instance variable (name) can be change as : player, NPC1 or NPC 2
so, the moving behavior is depend on what the "name" of the instance. If it create as "player" than it can be controlled, but when its as "NPC" or "NPC2" its move like an AI (NPC).
game play : when every NPCs create, it must move on other "player" or "NPC", depend on the nearest object (player).
As the Player with instance "NPC" : If the nearest object is Player ("player"), so it move on it, but if the nearest object is Player ("NPC2"), so it must move on to it.
problem : how can this object sprite can triggering what object targetting move? since all abject is the same sprite with only have different instance variable?
note : all player is only the copy of one sprite object!
here is the event sheet :