We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,171 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Pygame new level

I would like the player after he/her makes it to the end of the map to go to the next level.
Here is an example of a code that I would like you to change so the player will close and open another level... blah = unimportant coding and whatever is inside * and * is the code I want you to edit

 a = 0
 while a == 0:
     blah
     balh
     if player crashes into wall:
         print"HA"
         a = 1
while a == 1:
    *make new box*
2
Contributors
2
Replies
1 Week
Discussion Span
1 Year Ago
Last Updated
3
Views
Question
Answered
Twin802
Newbie Poster
12 posts since Apr 2012
Reputation Points: -3
Solved Threads: 0
Skill Endorsements: 0

Looks like you you are having unterminating while if you do not change the value of a in other loops. For me the a variable looks without purpose, why not just break out of while, no need for sentinel variable, it only confuses the issue.

pyTony
pyMod
Moderator
6,309 posts since Apr 2010
Reputation Points: 879
Solved Threads: 986
Skill Endorsements: 26

LIES ALL LIES!!!!!!!!!

Twin802
Newbie Poster
12 posts since Apr 2012
Reputation Points: -3
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 1 Year Ago by pyTony

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0625 seconds using 2.68MB