Python Forum
[PyGame] Having 4 players(Sprites) all being able to jump
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Having 4 players(Sprites) all being able to jump
#6
You can use treading and have a jump and move function. I won't give you the actual code, but execute the move and jump. The jump consists of going up and then down. Use time.sleep to make the jump realistic. The threading is needed so the sleep won't affect the main. Used with the move function they can move and jump at the same time. If you want them to not move while jumping, just don't thread it.
Reply


Messages In This Thread
RE: Having 4 players(Sprites) all being able to jump - by SheeppOSU - May-07-2019, 05:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pygame, sprites, and rects menator01 12 2,519 Dec-07-2023, 02:37 AM
Last Post: Benixon
  [PyGame] infinity jump problem augusto_A 3 1,877 May-27-2023, 01:17 AM
Last Post: deanhystad
  [PyGame] Sprites just randomly appear and dissapear in my pygame.sprite.GoupeSingle trueShadoWrr 2 2,202 Feb-13-2023, 09:34 AM
Last Post: Vadanane
  [PyGame] Players not falling from the platform, and some other errors. urmom33 1 1,845 Jan-23-2023, 10:28 PM
Last Post: deanhystad
  pygame double jump problem Yegor123 2 2,837 Nov-20-2022, 07:23 PM
Last Post: Yegor123
  [PyGame] Problems with jump code in pygame Joningstone 4 5,587 Aug-23-2021, 08:23 PM
Last Post: deanhystad
  [PyGame] Doodle Jump Dafteaser 2 4,791 May-25-2020, 09:06 AM
Last Post: lolloiltizio
  [PyGame] I found a way to generate sprites without .blit. Is it effecient? xBlackHeartx 19 9,042 Dec-07-2019, 01:06 PM
Last Post: metulburr
  Sprites and Actor error ajlconsulting 6 9,701 Jan-30-2019, 12:50 AM
Last Post: metulburr
  draw not showing all sprites ethanstrominger 0 2,729 Jan-25-2019, 10:10 PM
Last Post: ethanstrominger

Forum Jump:

User Panel Messages

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