How do I get Platforming A.I. to work properly.

Get help using Construct 2

Post » Sun Apr 27, 2014 3:28 am

I'm supposed to be doing a gamejam right now, but I've wasted 3 hours being stumped on this issue and figured I need to get some help otherwise I won't finish.

http://a.pomf.se/qrcznr.png

Example image.
I've used the distance method described elsewhere in forum, but it doesn't seem to work. No matter the distance of the player to main android colision boxes, it triggers his movement.
An oversight in the events?
Are there better methods?
With these methods I'd like it to work per instance (so i can have multiple independent enemies) and have them able to shoot and alternatively melee attack when within a small distance of player character.

Time is of the essence and thankyou in advance for looking. :D
B
21
S
6
G
2
Posts: 188
Reputation: 3,450

Post » Sun Apr 27, 2014 3:44 am

You're setting EVERY instance of that object to MOVE or to STOP at the same time, system check don't pick instances. Gowever you have an useless "for each" just bellow that, that should be on top above the events on top =P
Last edited by Sargas on Sun Apr 27, 2014 5:23 am, edited 1 time in total.
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sun Apr 27, 2014 5:13 am

Doesn't really help my main issue/problem at the minute sargas.

Even with only one guy spawned in-game, it is the same. He doesn't appear to have an invisible circle around him that triggers movement or not.

Anyone else?
B
21
S
6
G
2
Posts: 188
Reputation: 3,450

Post » Sun Apr 27, 2014 5:22 am

You're not being very helpful here,

You have the distance function dead wrong too.

you have distance(1.x, 2.y, 1.x, 2.y). you're measuring nothing. of course the event would NEVER trigger.

you need to input distance(1.x, 1.y, 2.x, 2.y) or distance(charcolision.X, charcolision.Y, policecolision.X, policecolision.Y)

I'm sorry for not being able to detect such a basic problem on my first try. I hope you can forgive me.
B
43
S
12
G
6
Posts: 446
Reputation: 6,802


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], ivanski1983 and 12 guests