playMaker

Author Topic: Starting new Level/Scene when all Objects are destroyed  (Read 520 times)

gianttree01

  • Playmaker Newbie
  • *
  • Posts: 1
Starting new Level/Scene when all Objects are destroyed
« on: April 26, 2022, 05:08:09 AM »
Hey,
i'm pretty new to PlayMaker and Im trying to do a 2D game. Somehow I can't figure out how do start the new Level after all the other GameObjects are destroyed (I have a Sphere, that collides with Cubes) and after all the Cubes are gone, I would like the new Level to start.
เกมสล็อต
Can someone maybe Help me with this Problem?
Thank you

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7624
    • jinxtergames
Re: Starting new Level/Scene when all Objects are destroyed
« Reply #1 on: April 26, 2022, 09:59:20 AM »
Hi.
There are multiple ways to do this.

set a int value with the block count.
Every time a block is destroyed deduct 1 to that int when the int is 0 then (check with Int Compare)

another way is to have an array with the cubes, then when a cube is destroyed/disabled) remove it from the array.
and check the array count.