How do I make my artificial intelligence work

Get help using Construct 2

Post » Sat Nov 26, 2016 10:42 am

Guys pls help.

I have started making new platformer game and everything was going well until i had multiple instances of same sprite that needs to be AI.

My problem:
My hero walks on his path up until he gets in their line of sight. Then they start walking towards him and that works fine with only one. But if i have him between two of them they will both move left or right simultaneously so only the one that is closer moves to him while other one moves away. Can anyone help on how to make them follow him independently if he is in their line of sight ?

Thx in advance guys :D
B
11
S
3
G
1
Posts: 34
Reputation: 872

Post » Sat Nov 26, 2016 11:45 am

Might be an instance problem.
Do you handle each instance (For each...)?
Image Image Image
B
43
S
22
G
15
Posts: 383
Reputation: 12,262

Post » Sat Nov 26, 2016 11:57 am

@mercuryus i tried it, and then sprite does not respond but thx.
B
11
S
3
G
1
Posts: 34
Reputation: 872

Post » Sat Nov 26, 2016 12:03 pm

@mercuryus I just tried it again since you mentioned it but this time I've put it for every single movement and exception and it worked. Thx mate, people like you are the reason this community is awsome. :D :D :D
B
11
S
3
G
1
Posts: 34
Reputation: 872

Post » Sat Nov 26, 2016 2:09 pm

:D thank you
Image Image Image
B
43
S
22
G
15
Posts: 383
Reputation: 12,262

Post » Sat Nov 26, 2016 2:28 pm

kaveljo try this tutorial might help you AI (Artificial Intelligence) in Construct 2

https://www.scirra.com/tutorials/5367/a ... onstruct-2
B
257
S
42
G
15
Posts: 1,991
Reputation: 41,411

Post » Sat Nov 26, 2016 4:00 pm

@Lordshiva1948 Thx mate! :D
B
11
S
3
G
1
Posts: 34
Reputation: 872



Return to How do I....?

Who is online

Users browsing this forum: dop2000, Yahoo [Bot] and 8 guests