Top-Down follower

Get help using Construct 2

Post » Sat Aug 11, 2012 9:43 pm

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!
B
19
S
6
G
5
Posts: 98
Reputation: 4,484

Post » Sat Aug 11, 2012 10:20 pm

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
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Tue Mar 12, 2013 3:14 pm

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

Thanks.
B
2
Posts: 2
Reputation: 254

Post » Tue Mar 12, 2013 6:26 pm

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...
B
6
S
3
G
1
Posts: 102
Reputation: 1,379

Post » Tue Mar 12, 2013 6:38 pm

@GingerBreadMan I highly recommend doing some tutorials and reading the manual till the steps above make sense
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 33 guests