How do I make ennemies walking to the player actual position

  • Hi,

    After i followed the beginner's guide "Ghost Shooter" i saw the event "when monster is outside layout > set angle toward (playerX, playerY)".

    This event make the monster set his direction toward the player position at the moment he get outside the layout, not on the actual player position. And i wanted to know how to make an enemy focus the player origin point at any moment of the game.

    I checked for patroll tutorial, but its about plateform game, so only left and right, and this game is in top view.

    Can someone help me or redirect me on a link? Thanks alot guys ! =)

    (Sorry, there is probably some mistakes in my english, im french)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Basically, you have to refresh the Monster's target coordinates regularly.

    Do this by using the following conditions/actions:

    Every X seconds
        -> For each Monster
             -> Set angle toward Player.X, Player.Y[/code:1f1o89sc]
  • Look so obvious now haha. Didn't even thought about time ...

    Thanks ALOT mate !! =) You just gave me a huge help for my project !

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