magnitude with actors
rollo
Member Posts: 15
Hi there GS members,
I am creating a game where there are two armies. I need help with magnitude. I figured out how tell the distance between two actors, but for my game there will be many enemies and heroes. I would like them to attack(move) towards the nearest enemy. Does anyone know how to do this with multiple actors. Here is a game where this happens
I am creating a game where there are two armies. I need help with magnitude. I figured out how tell the distance between two actors, but for my game there will be many enemies and heroes. I would like them to attack(move) towards the nearest enemy. Does anyone know how to do this with multiple actors. Here is a game where this happens
Best Answer
-
AppTaco Posts: 125Hey there,
Check out this template I just whipped together. It's based on the X axis. It can be made to be more accurate, but I was running short on time.
Let me know if you have any questions.
https://www.dropbox.com/s/kk3g8iakj8roxdn/Tracking Closest Enemy (X axis).zip
Answers
Right now it's not very "accurate". The warrior attacks the enemy that is closest to the left side of the screen.
AppTaco LLC
http://www.apptacostudio.com/
https://www.facebook.com/apptacostudio