How do I get monsters to move toward player instead of away?

0 favourites
  • 8 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I think the monsters in my first Platformer are cowards.

    When the player moves toward them they flee backwards.

    I think it has something to do with getting the monster sprite objects to be aware of the player and move toward it, but a bit a loss on how-to. Any suggestions?

  • what's the coding you use?

  • I just thought I could set a behavior for the sprites and it could get one sprite to follow another. IS the trick that I should put some logic linked to System.Every Tick to have one sprite follow the other?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can use LOS Line of sight to detect the player within certain radius. Then tell the enemy to chase the player.

    If the player is out of reach, you cell tell the enemy to standby.

    If currently the enemies are running away, probably you told them to do so in your coding.

  • That was exactly what I was looking for. "Has Line of Sigh to player t --> Move Forward -1 "

    Need to add some other conditions to get it flip, toward but am on my way.

    Thanks you for the direction.

  • You could try and do the beginners tutorial

    that will help a lot.

  • Thanks also found this video on how to make your monsters smarter to be helpful.

  • Actually the Newbie mistake was that I had added the Platform behavior to all the monsters. By default it is set to 'Default controls = True'. So my actions were being echo'd by the monsters, which is why they were running away.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)