I need a simple A.I. code so that my attacker will switch animations according to the direction it is going, and follow my actor on the x axis. Jumping would be good.
any help is appreciated.
animpos = (angle / 360) * nframes;
Freddy wrote:I need a simple A.I. code so that my attacker will switch animations according to the direction it is going, and follow my actor on the x axis. Jumping would be good.
any help is appreciated.
Troodon wrote:Have you got animations for the rotating enemy?
To make him look to the direction he is going, put this in his draw actor code:
- Code: Select all
animpos = (angle / 360) * nframes;
To make him follow you, check in the same draw actor if the x value is smaller or greater than your actor's x value and then just move slowly.
I hope this helped little.
Darc wrote:that otter said 360
Users browsing this forum: No registered users and 1 guest