Patrol and Attack

Get help using Construct 2

Post » Tue Apr 02, 2013 2:58 pm

With the help of users on this forum, I've reached a pretty good point in the development. I can have many NPCs walking around and navigating the level pretty well.

The problem comes when I want the NPCs to change what they are doing. Their standard action is to randomly walk around the level, however, I also have a system in place that has them shoot objects out in front of them, which get larger until they hit a wall, at which point they are destroyed. This is to replicate their field of vision, so certain parts are obstructed by walls, but NPCs will still be able to see the player from the 'corner of their eye' so to speak.

When these field of vision objects hit the player, it spawns a remember point at the players location, which the NPC should walk toward, and hopefully be updated when the field of vision again hits the player. This will allow the played to hide from and escape the NPCs.

In any case, I hope I explained that well. The problem is that I struggled to have the field of vision objects relate to the correct NPC, but I think I have that sussed. The issue comes when I want the NPC to follow the player. For some reason, once they have found the player, they just walk straight into a wall and get stuck. I cannot see what I have done wrong.

I'd also like to know if there is a way to simplify what I have done.

Link
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 930
Reputation: 9,358

Post » Tue Apr 02, 2013 5:19 pm

Are you using pathfinding to reach the player or just saying move in direction of the player?
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Tue Apr 02, 2013 7:12 pm

To reach the player
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 930
Reputation: 9,358


Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 17 guests