if any sprite excluding x on screen, do nothing, else, reset

0 favourites
  • 4 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Hi guys, I'm pretty new to Construct 2 and enjoying it very much thus far.

    In my game the player must remove the enemy from the screen without destroying every other object on the screen.

    I am able to apply different loss scenarios to my levels by using multiple event sheets and events for each one, but I can't help but feel there is a more elegant way than the one I'm currently using.

    Main event sheet is included in all layouts and it just has "Level complete if enemy is outside layout" and works fine.

    Level 1 has wooden boxes. Level fail if wooden boxes count = 0.

    Level 2 has metal boxes. Same as above but metal this time.

    Level 3 has a 3rd kind of box, same as above...

    etc... Some levels also have multiple different kinds of boxes which mean even more unique events required to cover those levels.

    What I really want is something like "if any sprite other than "Enemy" + "Floor" is on screen, do nothing, else, level fail." but I'm not sure how to do this.

    Thanks in advance for the help!

    edit: changed title to something more in line of what I'm asking

  • Is each level housing a certain amount of boxes? predefined?

  • Yes. For example level 1 will have 8 boxes forming a structure, the aim of the player is to destroy some of the boxes to make the structure fall over so the enemy rolls off the screen.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think this is might be something best solved by using Families. (See the manual for how they work.)

    That would let you deal with all "boxes" the same way for some effects. Unfortunately, families are not available to free users (like myself.)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)