Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: pygame.Surface.fill help
Post: RE: pygame.Surface.fill help

Would you be willing to clarify what you mean by the loop? Never mind, I just forgot to put parentheses after pygame.display.update
Shemira Game Development 3 6,242 Nov-29-2019, 12:01 AM
    Thread: pygame.Surface.fill help
Post: pygame.Surface.fill help

How do I fill the screen a certain color? I followed an example off of GitHub, but for some reason it is not doing anything. Any advice? import pygame (pygame.surface.Surface((800, 600)).fill((0, 255...
Shemira Game Development 3 6,242 Nov-28-2019, 05:59 PM
    Thread: Using Input() in If...Elif Statements
Post: RE: Using Input() in If...Elif Statements

How would I do that? I am confused about the dictionary part. Never mind, the dictionary part makes sense. How would I make the function without checking if the input is either hunt or heal?
Shemira General Coding Help 11 7,919 Nov-23-2019, 05:53 PM
    Thread: Using Input() in If...Elif Statements
Post: RE: Using Input() in If...Elif Statements

Well, what I want to happen is, when the user types hunt, they encounter a slime. When they type heal, they restore their health; the print statements represent those actions. I have the while loop so...
Shemira General Coding Help 11 7,919 Nov-23-2019, 05:41 PM
    Thread: Using Input() in If...Elif Statements
Post: RE: Using Input() in If...Elif Statements

Sorry, I am used to using JavaScript. Also, I did not know that. Do you have any advice on how I can solve my problem?
Shemira General Coding Help 11 7,919 Nov-23-2019, 05:33 PM
    Thread: Using Input() in If...Elif Statements
Post: RE: Using Input() in If...Elif Statements

while (True): decision = input("What would you like to do?") if (decision == "hunt"): print("You encountered a slime! What would you like to do?") elif (decision == "heal"): ...
Shemira General Coding Help 11 7,919 Nov-23-2019, 05:25 PM
    Thread: Using Input() in If...Elif Statements
Post: RE: Using Input() in If...Elif Statements

I tried that, but then the variable is set to either hunt or fight, and so it defaults to the first response, and I want to let the user hunt or heal more than once. I tried that, but now the elif st...
Shemira General Coding Help 11 7,919 Nov-23-2019, 05:04 PM
    Thread: Using Input() in If...Elif Statements
Post: Using Input() in If...Elif Statements

How would I make it so the user only has to type heal once? if (input() == "hunt"): print("You encountered a slime! What would you like to do?") elif (input() == "heal"): print("Your health ...
Shemira General Coding Help 11 7,919 Nov-23-2019, 04:53 PM

User Panel Messages

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