playMaker

Author Topic: Change Enemy sprites depend of the directions  (Read 313 times)

NN2

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Change Enemy sprites depend of the directions
« on: October 22, 2017, 05: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!

krmko

  • Hero Member
  • *****
  • Posts: 652
    • View Profile
    • Fat Pug Studio
Re: Change Enemy sprites depend of the directions
« Reply #1 on: October 22, 2017, 05: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.

NN2

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Re: Change Enemy sprites depend of the directions
« Reply #2 on: October 22, 2017, 05: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! :)

krmko

  • Hero Member
  • *****
  • Posts: 652
    • View Profile
    • Fat Pug Studio
Re: Change Enemy sprites depend of the directions
« Reply #3 on: October 22, 2017, 12: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?

NN2

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Re: Change Enemy sprites depend of the directions
« Reply #4 on: October 23, 2017, 12: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!