How can I make a Bubble Bobble-like Enemy AI?

Get help using Construct 2

Post » Tue Jun 24, 2014 1:58 am

Aphrodite wrote:
Mulletfingers999 wrote:@Aphrodite
One more noob question: how would I achieve the 'sometimes make them stop in place and jump behavior' for multiple enemies?


I would use the timer behavior I think, to make it trigger a condition after a certain time, to do this.


Thank you, @Aphrodite. This brings up two problems though:
1) The timer is exactly the same for every one of my enemy's instances. I want them to each jump at random times.

2) For some reason, my enemy's refuse to jump when I call Simulate platform pressing jump.

Here is my code:
Image

Best regards,
Liam O'Flynn
B
5
Posts: 20
Reputation: 267

Post » Tue Jun 24, 2014 7:25 pm

bump?
B
5
Posts: 20
Reputation: 267

Post » Tue Jun 24, 2014 9:19 pm

Quick example of how to set different timers for an enemy to control jumping.

randomjumps.capx
You do not have the required permissions to view the files attached to this post.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Wed Jun 25, 2014 1:33 am

@Minor
I added the code from your capx into my project, but although it worked in your capx it didn't seem to change anything in mine. I have uploaded the capx at https://dl.dropboxusercontent.com/u/132034306/game.capx (Note: I cannot upload it directly, the size (3 MB) exceeds the max size (2 MB)).

Best Regards,
Liam O'Flynn
B
5
Posts: 20
Reputation: 267

Post » Wed Jun 25, 2014 8:47 am

I've made a few changes that might help.

I've made "dir" a local variable to the "eye" you used a global variable which meant all the eyes moved the same direction, changed at exactly the same time whenever the global variable changed. Now I think they look better, looks like they don't all share the same brain :).

DOWNLOAD
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Wed Jun 25, 2014 2:17 pm

@Minor
Thank you and @Aphrodite very much! If I post the game, I'll mention you both in the credits =)
B
5
Posts: 20
Reputation: 267

Previous

Return to How do I....?

Who is online

Users browsing this forum: dand, mageekm, oosyrag and 30 guests