How do I go to next layout?

Just started using Construct 2? Post your questions here

Post » Sat Jul 25, 2015 12:15 pm

Hi guys, I have 3 layouts in my game, and I want it to go to next layout automatically when all enemies killed.
B
3
Posts: 8
Reputation: 185

Post » Sat Jul 25, 2015 12:49 pm

I think you could create a global variable on how many enemyes you have on the level and then create a code that deducts one each time you kill an enemy. After the variable reaches zero, move to next layout.

Image
B
7
S
1
Posts: 93
Reputation: 632

Post » Thu Jul 13, 2017 9:57 pm

Woww, really I asked this? Oh my giddy aunt :d
B
3
Posts: 8
Reputation: 185

Post » Thu Jul 13, 2017 10:00 pm

Your first day on C2 haha! :D
B
46
S
16
G
76
Posts: 2,150
Reputation: 45,313

Post » Sat Jul 15, 2017 11:35 am

You can also dynamically count the enemies, on start of layout add a for each loop and as action add +1 to a global variable, and you will get the total number of the monster without counting them your self :)

This can also be used for monster spawning during gameplay, and the variable will be adjusted to the new monster number.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest