0
backg.pos = 242, 105

WIDTH = int(backg.width + 200)
HEIGHT = int(backg.height + 50)

def draw():
    screen.clear()
    backg.draw()
print("hi")

I have a picture called dining that I am trying to use as a background in a game which works just fine on its own, but when I add the rest of the code


name = input("What would you like to be called?   >>>   ")
inventory = []
def welcome():
  print(f'Hello detective {name.title()}')
  print("There has been a murder by poison in this house of a woman named Carla, you have to find the clues to unlock who the murderer is, there are 10 suspects and 5 rooms all with clues that will be useful to your mission.                    \n\nYOUR MISSION: FIND THE MURDERER AND BRING THEM TO JUSTICE!\n")
  print("First question the suspects, then explore the rooms.")
  question()
def dr():
  drq = input("What do you want to do? \nA:Look in the cubbords \nB: Talk to Ella \nC: Go to a different room")
  if drq.title == "A":
    print("*You Find Insulin in the Cubbord*")
    print("[Ella]>>> That was Carla's insulin, she had diabetes type one.")
    inventory.insert("insulin")
    print("*INSULIN HAS BEEN ADDED TO YOUR INVENTORY*")
  elif drq.title == "B":
    print("This is the Dining Room, Please talk to me if you need any infomation")
  elif drq.title == "C":
    rooms()
  else:
    print("Please pick a valid option A, B, C")
  dr()
def lr():
 
  lrq = input("What do you want to do? \nA:Check the book \nB:Check the fire place \n C:Talk to Ella \nD: Go to a different room")
  if lrq.title == "A":
    print("*Notice The Book Has Some Blood On It* [YOU]>>> Who's book was this?")
    print("[Ella]>>> That's Johnny's book acctually, I better return it to him.")
    print("[YOU]>>>I would like to keep it for evidence.")
    inventory.insert("book")
    print("*BOOK HAS BEEN ADDED TO INVENTORY")
  elif lrq.title == "B":
    print("*In the fire place you see a burnt note that reads \"THE DEED IS DONE\" *")
  elif lrq.title == "C":
    print("This is the Living Room, we all relaxed here after dinner")
  elif lrq.title == "D":
    rooms()
  else:
    print("Please pick a valid option A, B, C")
  lr()
def mb():
  mbq = input("What do you want to do? \nA:Check the draws \nB:Talk to Ella \nC: Go to a different room")
  if mbq.title == "A":
    print("you rummage through the draws and find jewlery, makeup, and a knife!\nYou deside not to tell Ella as she has been through enough trouble and you need more evidence.\n*KNIFE HAS BEEN ADDED TO INVENTORY!")
  elif mbq.title == "B":
    print("[Ella]>>> This is me and my husbands bedroom, we slept here last night when the murder occoured.")
  elif mbq.title == "C":
    rooms()
  else:
    print("Please pick a valid option A, B, C")
  mb()

def rooms():
  room = input("Which room would you like to go to? \nA:Dining Room \nB:Living Room \nC:Master Bedroom \nD:Carla's Room \nE:The Kitchen \n >>>")
  if room.title == "A":
    dr()
  elif room.title == "B":
    lr() 
  elif room.title == "C":
    mb()
  elif room.title == "D":
    cr()
  elif room.title == "E":
    K()
  else:
    print("Please pick a valid option: A, B, C, D, E.")
    rooms()
  

def question():
  interview = input("Who do you want to question?    Ella, Johnny, Harry, Lesley, Brook, Casey, Corey, Adrien, Hannah >>>   ")
  if interview.title() == "Ella":
    print(f'\nI\'m Carla\'s Mother and i am so upset, I Think whoever did this NEEDS to be brought to justice, thank for spending your time to help us detective {name}')
  elif interview.title() == "Johnny":
      print(f'\nHello detective, I am Carla\'s brother. I was in my room when the murder occoured at 8 O\'clock, I heard her scream and being the scaredy cat I am, rather than going to see if I could find her and see if she was ok, I cowered in my bed.')
  elif interview.title() == "Harry":
    print(f'\nHello detective, I am Carla\'s Farther. I was with my darling Ella in our Master bedroom when the murder occoured, we had invited everyone over for dinner as it was, my beautiful daughters birthday, what a horrible day to be killed on')
  elif interview.title() == "Lesley":
    print('\nHello detective, I am Carla\'s nextdoor neighbour and we have been best friends for years, if you accuse me i will be very offended! This family seems to be addement it was me that killed her, I just think they don\'t want to belive it was part of their family that killed her')
  elif interview.title() == "Brook":
      print("\nHello detective, I am Carla\'s sister and although we have had our differences, I would never want to kill her, I was sleeping in the room next to Casey and Adrien.")
  elif interview == "Blake":
      print("\nCarla is my wife, I love her to pieces who ever did this, I will make them pay, with or without the Law on my side")    
  elif interview.title() == "Casey":
      print("\nI\'m Carla\'s Mothers\'s neighbour, they invited me and my husband, Adrien, over for dinner and we politely refused'")
  elif interview.title() == "Corey":
      print("\nI\'m Carla\'s Godfarther and although we have never been very close i do love her dearly.'")
    
  elif interview.title() == "Adrien":
      print("\nI\'m Casey's husband and I don\'t really know what happend, I have had little to none contact with Carla and have know idea what was going on. Me and my wife just stayed over there's for the night as we were having work done to our house")
    
  elif interview.title() == "Hannah":
      print("\nI\'m Carla\'s Godmother and have always loved and cared for my Godchild, I do not know for certain but I think Adrien and Casey are acting quite suspicious")
  else:
    print("\n\nPlease pick a valid option\n\n")
    question()
  bigq()
  
def bigq():
  answer = input("\nDo you want to \nA:Question anyone else \nor \nB:Do you want to investigate the rooms?\n>>>")
  if answer.title() == "A":
    print("\n\n")
    question()
  elif answer.title() == "B":
    rooms()
  else:
    print("Please pick a valid option A or B")
    bigq()
welcome()

(it's a murder mystery type thing and I just need help getting it to work) i need to type as it says there is to much codeeeeeee please reply for answers and if you need any more details thank you everyone for you kindness and support :-)

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
  • [Pygame Zero](https://pygame-zero.readthedocs.io/en/stable/) is not [PyGame](https://www.pygame.org/news). You have to use the [tag:pgzero] tag instead of the [tag:pygame] tag. – Rabbid76 Aug 04 '21 at 08:12
  • No Pygame and Pygame Zero are different. Pgame Zero extends Pygame (for instane the `draw` callback doesn't exist in Pygame), so you should use the [tag:pgzero] tag. The [tag:python] tag is correct. – Rabbid76 Aug 04 '21 at 08:22
  • i am using both the pgzero command and the python command? __so you should use the pgzero tag. The python tag is correct. – Rabbid76 4 mins ago__ – sabs fun Aug 04 '21 at 08:29

0 Answers0