Top-Down follower

0 favourites
  • 5 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hello all,

    I was curious as to how to go about something. I wanted to make it so that the player in my top-down shooter game could rescue someone (an NPC)and then the NPC will follow the player and shoot at any creatures that comes within range. Any thoughts or suggestions about how to make the NPC follow the player and keep a relative distance (not too far, not too close)?

    Thanks!

  • ok maybe this will help you :

    first of all put a boolean variable in your NPC

    and events will be like this :

    event1:

       condition : NPC boolean = false

       action : set postion = self.x , self.y

    event2:

       condition : NPC boolean = true

       action : set postion = player.x , player.y-20

    event3:

    condition:system compare 2 values : distance(player.x,player.y,NPC.x,NPC.y) < 40

       action: NPC set boolean to true

  • Hi zsangerous, I am quite new to Construct 2. Could u maybe explain or show exactly how you do the above?

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would create an object that is invisible and sets its position right behind the main sprite then have the rescued sprite constantly move to its position.

    Just to put the concept simply...

  • GingerBreadMan I highly recommend doing some tutorials and reading the manual till the steps above make sense

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