#npc looking to player

1 messages · Page 1 of 1 (latest)

proven iris
#

here what i did

#

i create two variables

#

one for the distance of the npc and the player, the other to see player direction

#

in one directions work

#

in the other don't

#

what i did wrong?

deep sierra
#
if (neat < 128) {
  if (player.x > x) {
    image_xscale = 1;
  }
  if (player.y < x) {
    image_xscale = -1;
  }
}```
#

this should work; you also need to make sure that by default the object's sprite is facing right

proven iris
#

it's a place holder

#

so it's depends on the scene