Mar-19-2019, 02:46 PM
(This post was last modified: Mar-19-2019, 02:46 PM by jjmaster3001.)
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?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
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" ) |