Python Forum
inconsitencies in my first code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
inconsitencies in my first code
#2
You need to dedent this section back into the while loop instead of the event loop
    if y1 >= 490:
        yvel *= -1
to like this
while True:
 
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
 
    if y1 >= 490:
        yvel *= -1
Recommended Tutorials:
Reply


Messages In This Thread
inconsitencies in my first code - by wildbill - Jul-31-2019, 02:56 AM
RE: inconsitencies in my first code - by metulburr - Jul-31-2019, 03:07 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020