Goto when all instances of object destroyed ?

  • Howdy,

    I have a demo i am working on, and need to have the System goto the next layout when all of the instances of an object are destroyed on screen in the layout i am on.

    Say i have 5 or 10 instances of the same object < a circle > && have them set to destroy when collision occurs w/ another object < say, a square > that has 8 direction movement and they go one at a time as this happens. I need the system to move to a new Level_Page when all of them are destroyed but not before. I suspect i need to do it with instance variables, but don't know how && have been back and forth, and back and forth, through the menus trying to work it out but no dice. I wonder if someone might help me work this out, or point me to a tutorial that shows how as i couldn't really find anything relevant. I would be grateful for any reply at all &&

    kind regards, mark-p.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Its super simple. Just use the "count" feature

    scirra.com/manual/133/common-expressions

    Compare the sprite count to 0 in your case and if so, goto next layout

    System "Every Tick> - Compare Sprite.count is equal to 0

    goto layout 2

  • Compare two variables: Circle.count = 0

    -> go to layout

  • Hey Guys, thanks a lot, really. I was snagged up on that all last night.

    kind regards, mark-p.

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