Make multiple enemies? (PLATFORMER)

Get help using Construct 2

Post » Fri Jul 26, 2013 2:26 pm

I'm having problems making multiple enemies in a side scrolling platformer game. I made a Family and grouped together the same kind of enemies and placed 2 in the Layout. They both seem to go only one direction even if I'm right between them (They're both going left even when the other is supposed to go right).

Their behaviors are Platform and Bullet. I use Platform in the Event to move them around (SIMULATE PRESSING). Is there a better way to have more than one enemy of the same type on screen at the same time?
B
1
Posts: 6
Reputation: 162

Post » Fri Jul 26, 2013 2:37 pm

Do you have a capx? from the description you give I can't get enough information.

It's possible to have many enemies on the screen at the same time, but if you want them to behave differently you have to set it up in your events.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jul 26, 2013 2:48 pm

Do you mean making a different event for each enemy on the screen? I've tried making a separate Family and Event for the movement but it still resulted the same..

Here's the capx file just in case:
http://www.mediafire.com/download/wpi19q3kss365at/test.capx
B
1
Posts: 6
Reputation: 162

Post » Fri Jul 26, 2013 2:59 pm

@leolr9

this solution works. Here's the capx file:
https://dl.dropboxusercontent.com/u/417253/new.capx

I created a for each loop to go through each object in the walkers family


so it's like this (just in case capx file link goes dead in future):

for each walker{
   if player.x < walkers.x
      simulate platform left
      set mirrored

   if player.x > walkers.x
      simulate platform right
      set not mirrored

}russpuppy2013-07-26 14:59:38
B
62
S
12
G
6
Posts: 456
Reputation: 8,944

Post » Fri Jul 26, 2013 3:01 pm

p.s. i like the art in your game. Did you do it yourself?
B
62
S
12
G
6
Posts: 456
Reputation: 8,944

Post » Fri Jul 26, 2013 3:06 pm

Oh didn't think about that. Thanks a lot! This works

PS: Yeah, it was pretty rushed. Thanks :)
B
1
Posts: 6
Reputation: 162


Return to How do I....?

Who is online

Users browsing this forum: AkbarAsgharMG, cjbruce, Yahoo [Bot] and 7 guests