Clear screen for new level
Author |
Message |
codergirl
|
Posted: Sun Jun 03, 2018 2:38 pm Post subject: Clear screen for new level |
|
|
I'm writing a platform game right now and what I want to do is when a player reaches a certain object, and the level is completed, the screen clears and a new level appears.
How would I go about clearing the screen?
I have a loop with all my code in it but if I try doing an if statement with cls in the loop it does nothing
Help please!!! |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Mon Jun 04, 2018 9:33 am Post subject: RE:Clear screen for new level |
|
|
You don't just need to clear the screen, you need to display the new level data. A good method to start with is to completely exit your loop, and start a new loop with all the code for level 2 in it. One you figure that out you'll want some more advanced techniques that will save you time and code but this will work for now. |
|
|
|
|
![](images/spacer.gif) |
codergirl
|
Posted: Wed Jun 06, 2018 6:45 pm Post subject: Re: Clear screen for new level |
|
|
Ok I figured it out, thank you! |
|
|
|
|
![](images/spacer.gif) |
|
|