Distance From
GingerBGames
Member Posts: 390
Hello GS'ers,
I've got 2 actors, Hero & Goon. I have Goon off the screen, and the Hero walking towards him. How do I get it to happen when the Hero get's within a certain distance from Goon, Goon then runs after him and then stops in front of Hero?
I've currently got this.
If Hero's X is less than 200 self X (Goon Actor)
then animate Goon and Move To Hero's X + 15 (Goon is coming Right To Left towards the Hero)
This isn't working, I've played with this for about an hour and a half now, either the Goon does nothing or he just moves towards the Hero no matter the distance? I really don't know what else to do. I had it move towards with a "Trigger", but I want to use a little resources as possible!
Thank you.
I've got 2 actors, Hero & Goon. I have Goon off the screen, and the Hero walking towards him. How do I get it to happen when the Hero get's within a certain distance from Goon, Goon then runs after him and then stops in front of Hero?
I've currently got this.
If Hero's X is less than 200 self X (Goon Actor)
then animate Goon and Move To Hero's X + 15 (Goon is coming Right To Left towards the Hero)
This isn't working, I've played with this for about an hour and a half now, either the Goon does nothing or he just moves towards the Hero no matter the distance? I really don't know what else to do. I had it move towards with a "Trigger", but I want to use a little resources as possible!
Thank you.
Comments
you need to use magnitude
cheers