How do I create roaming AI on a set path continuously?

Get help using Construct 2

Post » Mon Mar 24, 2014 11:02 am

Hi, I've been trying (and failing) for days to create AI that moves along a set path continuously. I have a few different AI that need to do this but I started trying to get one to work. The AI that im trying to get to move needs to move from left to right on a loop. Ive tried literally every type of movement behavior and event and just can't figure out how to do it. The main method ive used is pathfinding. When uisng pathfinding on my AI i can get it to move from left to right fine. But when i try to get him to move from left to right and then back to left again it bugs out and moves left and stays there dancing around on the spot.
If anyone can help me with this issue it would be greatly appreciated :)

Thanks
Liam
B
2
Posts: 4
Reputation: 160

Post » Mon Mar 24, 2014 12:01 pm

Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Fri Mar 28, 2014 2:43 pm

Thanks for replying and yes thats exactly what Im after :) Im really sorry that I havent replyied to you before now but ive been super busy :(
I am having one issue with the example you sent me. I have dupicated everything from the example you sent to me into my game (changing what needed to be changed of course). The NPC in my game isnt moving continously, it is once again moving to the first point and staying there (This was with the movment location sprites on the top layer, two layers above the NPC). I then moved the Movement sprites on to the same layer as the NPC and it moved to a different sprite (the one it was closed to) and stoped still again. The same thing happend when i moved the movment sprites to the bottom layer.
Once again thanks a lot for posting, the file you sent did help a lot despite me still having one issue. :)

Edit: I did try to post a link to an image of my event sheet so that you could see what id done to try and make it a bit easier but the link was removed :(
B
2
Posts: 4
Reputation: 160

Post » Sun Mar 30, 2014 6:50 am

Can you post up a CAPX of how it's misbehaving and I can take a look.
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Mon Mar 31, 2014 12:37 pm

Ive recreated the pathfinding that I have done on my full game in a seperate file, so that its easier for you to find (Rather than have you try to search through the event sheet to find it). The NPC does the same thing in this version as it does in my full game.
dropbox.com/s/i1f260c009ojrgh/TestFile!.capx
The URL is missing the WWW. this is just so I can get around it being removed :)

Thanks again :)
B
2
Posts: 4
Reputation: 160

Post » Sun Apr 06, 2014 11:39 am

I have got the NPC's moving around my game now. I did it a slightly different way to the way you showed me, but your way helped a great deal.

Thanks again :D
B
2
Posts: 4
Reputation: 160


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 37 guests