level advancing

Get help using Construct 2

Post » Fri Mar 06, 2015 1:42 am

How would you suggest making a condition where a player can advance only once all enemies on a level have been destroyed. I have considered, but not yet implemented the idea of assigning each enemy a value and when the total value of all enemies is reached giving the player the option to move on to the next level. If anyone has an idea that would accomplish my goal in a more efficient matter i would love to hear it. Any and all feedback is very much appreciated.
dropbox link to the capx is below.


https://www.dropbox.com/s/av4hg5vp73dfs ... .capx?dl=0
B
6
S
1
Posts: 47
Reputation: 759

Post » Fri Mar 06, 2015 2:05 am

Just use the Count expression. :)

When Enemy.count is 0, level is accomplished


For any other useful expressions, read this, I hope it will help : www.scirra.com/manual/133/common-expressions
B
11
S
3
G
1
Posts: 91
Reputation: 997

Post » Fri Mar 06, 2015 2:22 am

Thanks. That seems like a good idea but i should have mentioned earlier, there are 4 types of enemies in my game and the count expression appears to only serve me well when i have only one enemy type.

https://www.dropbox.com/s/av4hg5vp73dfs ... .capx?dl=0
B
6
S
1
Posts: 47
Reputation: 759

Post » Fri Mar 06, 2015 2:31 am

Actually I am not home so I can't open your project, sorry.

What about creating an event that ends the level when the object count of all types of enemies is 0? Something like this (multiple conditions single event):

______________________
|Enemy1.count is 0 | [*End level*]
|enemy2.count is 0 |
|enemy3.count is 0 |
|enemy4.count is 0 |
______________________


If that will not work for you, I'll try to edit your .capx file in the afternoon :)
B
11
S
3
G
1
Posts: 91
Reputation: 997

Post » Fri Mar 06, 2015 3:00 am

thnx again ill try that
B
6
S
1
Posts: 47
Reputation: 759

Post » Fri Mar 06, 2015 5:36 am

if you have the full version of Construct I recommend using a family and put all your enemies in that family. This will allow you to count for each enemy in the family and not just each single enemy.
B
29
S
6
G
1
Posts: 93
Reputation: 3,020


Return to How do I....?

Who is online

Users browsing this forum: jobel, omnipaws, tarek2, Zjahel0001 and 5 guests