My coding:
import sys
inventory = []
print "Hello, what happens to be your name?"
name = raw_input("What is your name?")
print """Welcome %s, you have been captured!!! You must attempt to escape the castle,
or if you are feeling particularly lazy, wait for help to arrive
(which may never happen)!!! What will you choose?""" % (name)
print "Wait, or Escape?"
path = raw_input("Will you wait or escape?")
if path == "wait":
print "Help never comes and you eventually die of boredom... Game Over."
raise SystemExit
if path == "escape":
print "You find 3 tools but can only carry one, which one will you take?"
toolc = raw_input("Options: 1 = Dagger, 2 = Candle, and 3 = Hammer")
if toolc == "1":
inventory.append("Dagger")
print "You have chosen the dagger!"
elif toolc == "2":
inventory.append("Candle")
print "You have chosen the candle!"
elif toolc == "3":
inventory.append("Hammer")
print "You have chosen the hammer!"
print """Level 1: You are in a dungeon at the bottom of a castle,
the room is relatively dark, and a locked door is visible, what do you do?"""
if inventory.index("Dagger"):
level1 = raw_input("Use your dagger, type dagger to do so!")
Side note, everything is spaced properly, it just doesn't show up in the comment.
Everything works fine up until the end at the if inventory statement, the console just ignores it completely even if you choose the dagger in the previous options. I have tested to make sure the chosen item is placed in the inventory so that's not the problem, I don't even get an error message to help me too.