0

How do I make a string not show under certain circumstances?

I've been trying to make a story game where if you die, the rest of the game's story doesn't show. How do I do this?

14th Jan 2017, 9:21 PM
Nathan Watkins
Nathan Watkins - avatar
5 Respuestas
+ 1
if *statement*: print("yout text")
14th Jan 2017, 9:53 PM
Yunus Kaya
Yunus Kaya - avatar
0
I'd simply use an if statement!
14th Jan 2017, 10:45 PM
Mohammad Hossein Barati
Mohammad Hossein Barati - avatar
0
It didn't work when i used it like this: def d5(): if dead == 0: print() print('Day Five') print('§------§') print() print('Your journey') print('is almost done') print() print('You see something') print('in the distance') enc() d5()
14th Jan 2017, 11:00 PM
Nathan Watkins
Nathan Watkins - avatar
0
print ("your story starts here") alive=True ## your first chapter print("you're walking in the woods and you die") alive=False ##your second chapter if alive==True: ##content of chapter 2
15th Jan 2017, 12:32 AM
Badmephisto
Badmephisto - avatar
0
if(d=!notdead){ //show what t you want show } else{ //dont show }
15th Jan 2017, 4:31 AM
Hisani msigwa
Hisani msigwa - avatar