Problem with instances (with some basic AI)

Get help using Construct 2

Post » Sat Mar 28, 2015 3:08 pm

Back with some instance trouble, I just don't seem to grasp it .... :oops:

https://dl.dropboxusercontent.com/u/98471899/Scirra/testAI.capx

I tried to make some basic AI here and it works with one instance but if you duplicate the soldier it will mess up things. Not sure about the "For Each" event here, it doesn't seem to work with or without it....
And press Z will create a grenade that should land on the solid block, it works most of the time but sometimes it falls through the block if you keep pressing Z enough times. :?:
B
8
S
1
G
1
Posts: 35
Reputation: 1,172

Post » Sun Mar 29, 2015 8:10 am

Ai is all about right picking the instance. If this is your firs try on AI I suggest try something more simple, basic Ai.. then start to build up to your character.

I have some examples of basic AI here https://www.scirra.com/store/bundles/blue-robot-guy-ai-bundle-3580
and some more complex, handling attack states here https://www.scirra.com/store/royalty-free-game-templates/beatem-up-platformer-687
Image
B
46
S
12
G
6
Posts: 270
Reputation: 11,616

Post » Tue Apr 07, 2015 9:32 pm

Well,it doesn't seem to work for me no matter how simple I make it...

here is a somewhat simplified version
https://dl.dropboxusercontent.com/u/98471899/Scirra/testAI2.capx
pic
https://dl.dropboxusercontent.com/u/98471899/Scirra/testAI.jpg

Again, it works with one instance but not with two or more. Is there is some way to make it work?
B
8
S
1
G
1
Posts: 35
Reputation: 1,172

Post » Sat Apr 11, 2015 6:57 pm

Bump.
Here's the example even more simplified:

https://dl.dropboxusercontent.com/u/98471899/Scirra/testAI3.capx

The AI is just some random events, I can't make this work with two or more enemies on screen...
Last edited by Plowman on Wed Apr 15, 2015 9:47 pm, edited 1 time in total.
B
8
S
1
G
1
Posts: 35
Reputation: 1,172

Post » Wed Apr 15, 2015 9:47 pm

https://dl.dropboxusercontent.com/u/98471899/Scirra/testaAI3.jpg

and here is a pic of the simplified code.
B
8
S
1
G
1
Posts: 35
Reputation: 1,172

Post » Wed Apr 22, 2015 9:43 pm

I guess I'll be a nuisance and bump this thread now and then and see if anyone can help 8-) .
I have tried lots of different things and looked in the tutorial section, but of no avail...
B
8
S
1
G
1
Posts: 35
Reputation: 1,172

Post » Thu Apr 23, 2015 1:15 am

blackhornettechnologies.com/Construct2Stuff/testAI3_BHT.capx

I think there were too many states conflicting. I'm also not a fan of Trigger-once, and given you already have two states, it seems redundant to that also.
ImageImageImage
B
70
S
19
G
140
Posts: 3,320
Reputation: 82,722

Post » Thu Apr 23, 2015 11:00 am

Great, thanks a lot!
That takes care of the grenede problem mentioned in the first post too; Trigger-once messed things up, so that's good to know.
B
8
S
1
G
1
Posts: 35
Reputation: 1,172


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], Magistross and 0 guests