Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stacking Problem in a game.
#3
(Aug-05-2022, 07:55 AM)bowlofred Wrote: You set the damage for Fists to be 1 at line 7. And you reduce bhp by it at line 19.

But then at line 23, you change it to a random number between 2 and 4 and the original value is lost. You're using the same variable (dmg) for both player's damage. Probably you need to keep track of it separately.

Thank you! Really helped!
Reply


Messages In This Thread
Stacking Problem in a game. - by HelloTobi22 - Aug-05-2022, 07:40 AM
RE: Stacking Problem in a game. - by bowlofred - Aug-05-2022, 07:55 AM
RE: Stacking Problem in a game. - by HelloTobi22 - Aug-05-2022, 09:48 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with my pong game code Than999 8 3,895 May-15-2022, 06:40 AM
Last Post: deanhystad
  Problem restricting user input in my rock paper scissors game ashergreen 6 4,678 Mar-25-2021, 03:54 AM
Last Post: deanhystad
  Guessing game problem IcodeUser8 7 3,723 Jul-19-2020, 07:37 PM
Last Post: IcodeUser8
  Python Hangman Game - Multiple Letters Problem t0rn 4 4,779 Jun-05-2020, 11:27 AM
Last Post: t0rn
  game of the goose - dice problem koop 4 3,543 Apr-11-2020, 02:48 PM
Last Post: ibreeden
  Image Stacking Help Rhys_SSD 2 2,694 Feb-25-2019, 10:49 AM
Last Post: Rhys_SSD
  Dice Throwing Game in Python (I have a problem) yuseinali 1 3,154 Jun-22-2017, 10:22 PM
Last Post: metulburr
  Stacking generators Ofnuts 2 19,728 Sep-18-2016, 08:36 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

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