Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Clear screen for new level
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
codergirl




PostPosted: 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!!!
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: 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.
codergirl




PostPosted: Wed Jun 06, 2018 6:45 pm   Post subject: Re: Clear screen for new level

Ok I figured it out, thank you!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: