Enemy AI please

Just started using Construct 2? Post your questions here

Post » Sun Feb 05, 2017 8:57 am

Hi guys i'd love some help on enemy AI eg some follow you some sleep then when you go near they attack ones that shoot when you go near
Image
B
20
S
10
G
10
Posts: 229
Reputation: 7,624

Post » Sun Feb 05, 2017 11:21 am

It's not something you do when beginning with game developing. It will take a lot to understand the process if that's your very first experience.
I can only give you a tip that if you want one object (enemy sprite) to have different actions that would depend on his own condition and interaction with the player you should use "For each" condition (In system) often in combination with the unique identification variable for each enemy (If your enemy build of few sprites for example).
I'm a Magician, not a Developer.
B
21
S
8
G
25
Posts: 105
Reputation: 14,252

Post » Sun Feb 05, 2017 5:32 pm

Sounds like All of your enemy AI should use LINE OF SIGHT plugin.

If player spotted | Shoot/ Follow/ Sleep.

There are many ways to implement this. Look at you C2 examples first.
Image Image Image
B
29
S
11
G
27
Posts: 729
Reputation: 16,995

Post » Sun Feb 05, 2017 8:30 pm

Thanks for your help
Image
B
20
S
10
G
10
Posts: 229
Reputation: 7,624

Post » Thu Feb 09, 2017 9:45 pm

Also check the tutorial section if you haven't already. There are quite a few good examples in there, some with capx files.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Thu Feb 09, 2017 10:24 pm

depends on your enemy..

what kind of game is it? what do you want the enemy to do?
B
88
S
29
G
14
Posts: 1,154
Reputation: 15,003


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest