Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nothing happens
#1
Hi, when I run this script, it comes up with nothing, no words or anything. Is there something I am doing wrong, and what is it?
def main_game():
    inv = [ ]
    print("You wake up in a forest, and don't know where you are,")
    a = input ("Type 'A' to build a shelter, 'B' to look for shelter, or 'C' to look for food: ")
    if a == "A":
        print("You come across some pieces of ply wood, and some stones up on a hill")
        a1 = input("Type 'A' to use the wood, or 'B' to use the stones: ")
        if a1 == "A":
            have_shelter = True
            print("the wood seems strong and durable, you start using it to build a shelter, you see a storm in the distance.")
            print("your shelter is successful and looks good, it defends well against the storm.")
            a2 = input("to take apart your shelter type 'A', type 'B' to leave it as is: ")
            if a2 == "A":
                have_shelter = False
                inv.append("wood")
                print("this is your inventory")
                print(inv)
                print("You now have a shelter to come back to")
                print("you see a man with a gun running at you, he trys to hit you with it.")
                a3 = input("To block with the wood, type 'A', type 'B' to not.")
                if a3 == "B":
                    print("You stand there, while he beats you to death.")
                if a3 == "A":
                    if have_shelter == True:
                        print("You reach for the wood, but it is connected to your shelter, he beats you to death")
                    if have_shelter == False:
                        print("You take your wood and block his attack, you break the board over his head, he dies.")
                        print("You pick up the gun")
                        inv.remove("wood")
                        inv.append("gun")
                        print(inv)
                        main_game()
            if a2 == "B":
                print("You now have a shelter to come back to")
                print("you see a man with a gun running at you, he trys to hit you with it.")
                a4 = input("To block with the wood, type 'A', type 'B' to not.")
                if a4 == "B":
                    print("You stand there, while he beats you to death.")
                if a4 == "A":
                    if have_shelter == True:
                        print("You reach for the wood, but it is connected to your shelter, he beats you to death")
                    if have_shelter == False:
                        print("You take your wood and block his attack, you break the board over his head, he dies.")
                        print("You pick up the gun")
                        inv.remove("wood")
                        inv.append("gun")
                        print(inv)
        if a1 == "B":
            print("You start to build your shelter, when you see a storm coming your way.")
            print("When your almost done building, the stones fall leaving you with nothing. The storm knocks a tree over, it falls on you, you die.")
    if a == "B":
        print("You come across a cave, a cabbin, and a teepee.")
        b1 = input("Type 'A' to go to the cave, 'B' to go to the cabbin, or 'C' to the teepee: ")
        if b1 == "A":
            print("You go into the cave and see a dark shadow, reconizing it as a bear, you start to run.The bear grabs you and rips you apart. You die")
        if b1 == "B":
            ("you go into the cabbin, when you see someone, he looks scared and is holding a rifle towrds you.")
            b2 = input("to defuse the tention, type 'A', type 'B' to run: ")
            if b2 == "A":
                print("you say 'I dont want to hurt you,' he replies 'I can't trust you' and shoots you. you die")
            if b2 == "B":
                print("you run, he shoots you in the back. you die")
Reply


Messages In This Thread
Nothing happens - by jjmaster3001 - Mar-19-2019, 02:46 PM
RE: Nothing happens - by Larz60+ - Mar-19-2019, 03:09 PM
RE: Nothing happens - by jjmaster3001 - Mar-19-2019, 03:15 PM
RE: Nothing happens - by Larz60+ - Mar-19-2019, 03:18 PM
RE: Nothing happens - by jjmaster3001 - Mar-19-2019, 03:24 PM
RE: Nothing happens - by Larz60+ - Mar-19-2019, 03:39 PM
RE: Nothing happens - by jjmaster3001 - Mar-19-2019, 03:51 PM
RE: Nothing happens - by ichabod801 - Mar-19-2019, 04:13 PM
RE: Nothing happens - by jjmaster3001 - Mar-19-2019, 04:22 PM
RE: Nothing happens - by jjmaster3001 - Mar-19-2019, 05:26 PM

Forum Jump:

User Panel Messages

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