Hey guys, I am trying to teleport my player to the next chronological level once they destroy the last sphere on the map. How can I make it easier to go to the next sequential level after the last sphere of Level 2 is destroyed without affecting the behavior at Level 1? Should I make an entirely new bundle for that?
All code is reset upon loading a level, if the same object is on level 1 and level 2, they both will have 8000 health. Additionally, it will have 8000 health when restarting the level too.
You could change the LoadLevel behavior to “Next Level” so it doesn’t just load one level.
If you want the Health value to change every level, there is some additional behavior to add but would be simple to do.
I now have another issue: when I load into the 2nd level, the enemy doesn’t follow and drain my health. Is there a way to fix it? I also want to make it so that once every sphere is destroyed, they go to the next level
Now if you plan on having multiple medium spheres, then you will need to move the “LoadLevel” code to the player and the code shown for the small sphere would go in the medium sphere messaging the player.
Your solution kind of works, but it teleports me after destroying the 2nd small sphere. I’m also going to have a Large Sphere and a Giant Sphere. I want to make it possible so that once you destroy all the spheres on the current level, you go to the next level.
That would be better, as long a single object can count and activate the Next Level trigger.
I showed the meduim sphere because that was what you were using for the LoadLevel behavior at the end of the level. But as I said above, its not good if you plan on using multiple meduim spheres in a single level.
Here’s an example using globals to send to the player.