I'm currently creating a game that looks like RPG game. I have an issue to attack specific instance of enemies with a bullet which the bullet always aim the clicked or targeted enemy. In this case I use Set Angle Toward Position in Every Tick Event. There the issue appears. Every X second an enemy will spawn. But, when I click specific object the bullet will aim random enemy. How do I can match the bullet target with clicked enemy? That action is possible in the same event (Click Event), but in another event (That is Every Tick event) the targeted enemy cannot be determined.
I try like this:
On Left Button Click on Enemy -------> Spawn Projectile
Every Tick -------> Projectile Set angle toward (Enemy.X, Enemy.Y)
I heard this can be solved by matching UID. But I don't know. Can you help me?