How do I make top-down AI

Get help using Construct 2

Post » Tue Nov 24, 2015 12:28 am

Hello, I am trying to make a top down adventure shooter and I am having problems with my enemy AI. What I want to happen is for the enemies to walk around in a random pattern (doing fine with that, so far) until they see the player, at which point the charge the player and attacks. I've set it up with instance variables (on the AI themselves), line of sight (which signals when the player is near), path finder(to charge the player), and 8 direction (just for the random walking). can somebody please tell me what I'm doing wrong?
B
12
S
3
Posts: 30
Reputation: 842

Post » Tue Nov 24, 2015 12:35 pm

If you can explain what is happening, what your current events are and what you expect to happen, it will be a much easier question to answer..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Nov 25, 2015 6:44 am

I think I figured it out, I had an instant variable set to change, between 1-4, every 3 seconds. All 4 changed the directions, but if the enemy saw the player it would change to 5, which would give it a pathfinder to the player. I had to add an every second, to the pathfinder, so they'd stay on the player.
B
12
S
3
Posts: 30
Reputation: 842

Post » Wed Nov 25, 2015 10:26 am

place the .capx file, for i can to help you.
B
28
S
9
G
3
Posts: 280
Reputation: 4,162

Post » Thu Nov 26, 2015 2:32 am

I would place it, but I'm not quite sure how to.
B
12
S
3
Posts: 30
Reputation: 842

Post » Thu Nov 26, 2015 3:03 am

Get a dropbox account and add the file to it and get the share link and when you post it change the last number after DL=0 to DL=1

that how im doing it oh and dropbox has a free 1gb storage for you to use so I would just make a tester capx for the problem and remove it as you get it solved
B
51
S
24
G
6
Posts: 391
Reputation: 7,820

Post » Sun Nov 29, 2015 1:25 am

Message: RhettBlood is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Sorry it took me a bit to get this back to you (hecktick holiday), but here it is, I think. I solved the problem with pathfinder but if you'd still like to see if you can make any improvements go ahead.
B
12
S
3
Posts: 30
Reputation: 842


Return to How do I....?

Who is online

Users browsing this forum: imhotep22, mikeOstaff, RXIIIGAMES, skrotar, SnipG and 12 guests