Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: NN2 on October 22, 2017, 08:06:02 AM

Title: Change Enemy sprites depend of the directions
Post by: NN2 on October 22, 2017, 08:06:02 AM
So I've tried to move enemies and characters to some points by using itween move to and it perfectly worked.
However, I cannot change their sprites depend on where they go since they don't use axis..

I want to make them to automatically change their sprite like: if the object is moving left, the sprite of it changes to the one with faced left.

I've searched this question a lot but couldn't get the right answer :(
Could you help me solve this question?

+I use blendtree for the animation but maybe it's not a good idea. (it worked for player because it uses axis..)

Bye!
Title: Re: Change Enemy sprites depend of the directions
Post by: Fat Pug Studio on October 22, 2017, 08:23:24 AM
You don't need to change the sprite, just set scale to -1 to flip. If you need to change the sprite, i know how, i'll post it when i get home.
Title: Re: Change Enemy sprites depend of the directions
Post by: NN2 on October 22, 2017, 08:43:36 AM
You don't need to change the sprite, just set scale to -1 to flip. If you need to change the sprite, i know how, i'll post it when i get home.

Oh, Yes please! It's because I have sprites for 8 directions. I'm looking forward to see your reply. Thanks! :)
Title: Re: Change Enemy sprites depend of the directions
Post by: Fat Pug Studio on October 22, 2017, 03:27:27 PM
It would be easy if you used keyboard, but since i presume you are using mouse since you're tweening. Since they don't use axis i presume they don't rotate?
Title: Re: Change Enemy sprites depend of the directions
Post by: NN2 on October 23, 2017, 03:53:55 AM
It would be easy if you used keyboard, but since i presume you are using mouse since you're tweening. Since they don't use axis i presume they don't rotate?

Oh, I use keyboard not mouse. They don't rotate because they should move like characters in Pokemon gold and sliver but in 8 direction!