How to Destroy Multiple Enemies Before Moving On?

Get help using Construct 2

Post » Mon Jun 10, 2013 7:33 pm

I believe, from your first post, is add a second condition so that you need to destory first AND second level monster thing.
B
20
S
7
G
4
Posts: 322
Reputation: 4,531

Post » Mon Jun 10, 2013 7:44 pm

That's what I'm trying to do:), I just don't know how to. What would the action/condition path look like?
B
39
S
9
G
1
Posts: 632
Reputation: 4,037

Post » Mon Jun 10, 2013 8:05 pm

Gimmie a second.. just been watching E3. Doing it now hold tight;

Edit:
Ok wow.. I can't add a second condition eg "Collision with Level1 sprite AND level2 sprite.." gimmie a minute to do a variable.Sulli2013-06-10 20:11:21
B
20
S
7
G
4
Posts: 322
Reputation: 4,531

Post » Mon Jun 10, 2013 8:18 pm

http://db.tt/snQMx3Ci
Hope this helps.

Bit messy but the concept is there-- work from it :-)
B
20
S
7
G
4
Posts: 322
Reputation: 4,531

Post » Fri Jun 14, 2013 9:08 pm

OK, I've been trying to work with it, but I still can't seem to get it to work:(

Does the "or" make it so that the "greenball" will have to hit one enemy, and then another enemy before moving on? Or, does it mean that the "greenball" can collide with either of the enemies to move on?

Also, do I have to make a new "EnemyCount" variable for each level?




Thanks a lot,
Guannstar
B
39
S
9
G
1
Posts: 632
Reputation: 4,037

Post » Fri Jun 14, 2013 11:56 pm

Is this what you're looking for?

Destroy to move on!

Basicly I did the following:

Sprites created:
Arena (an invisible sprite covering the entire game screen)
BadGuy (the enemy you must destroy on collision. It also has multiple frames to change their color with different levels)
GoodGuy (you! control with arrow keys)

Global Variables:
LVL=0 (this variable will tell which level you are in and will greatly help in the creation of the BadGuy in the field)

Layers:
Layer 1
Layer 0

And a text box to show the value of the variable LVL.


So basicly what I did here was to place the Arena sprite on Layer 1 and the Good and Bad guys on Layer 0, this way I could create the condition "If Arena is NOT overlapsing BadGuy" since Arena will always stay on top even when new BadGuys come into play.

When the condition is true, the variable LVL will gain +1 to it's current value, and it will also set a text box with the number that LVL is holding.

The condition, when true, will also loop a number of times equal to the variable LVL, to create a BadGuy in a random position of the game screen and to change it's animation to a different frame, which holds a different color.

The reason when changing frames it's LVL-1 is because the frames have a frame numbered 0, so if you're on lvl 1 and the BadGuy has the first frame (which is 0) colored red, then it will be red.

Hope this helped!
B
15
S
2
G
2
Posts: 23
Reputation: 1,751

Post » Sat Jun 15, 2013 12:33 am

Thanks:), but no, I'm looking for something where the greenball must hit/collide with all 2, or 3, or 4 (depending on the level) multiple enemies (but not at the same time) before moving on to the next level:)
B
39
S
9
G
1
Posts: 632
Reputation: 4,037

Post » Sat Jun 15, 2013 12:35 am

It seems like it should be easier than that:)...
B
39
S
9
G
1
Posts: 632
Reputation: 4,037

Post » Sat Jun 15, 2013 12:52 am

Well either I'm not understanding your problem very well or I'm simply an idiot hehe XD

Would you kindly explain exctly what you want to do? I always tought it would be something like what my example showed.
B
15
S
2
G
2
Posts: 23
Reputation: 1,751

Post » Sat Jun 15, 2013 1:29 am

Haha sorry man:)... OK, here it is, the greenball, or "goodguy" should have to collide with multiple enemies (which are separate sprites) before moving on, it shouldn't be just one sprite reappearing a certain amount of times.

Thanks...
B
39
S
9
G
1
Posts: 632
Reputation: 4,037

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests