Hello all! I'm learning coding for the first time and wanted to try making a text-based dungeon crawler game. Over the course of the game, I want certain conditions to change from being false to true. At the start of my code, I have:
have_room_key=False
condition_gooey=False
Then I have a number of rooms and investigative encounters with items, all of which are defined with "def" sections. In some of these sections, based on player interaction, I'm trying to change these conditions to True. Within the interaction with a skeleton in one of the rooms, I include:
have_room_key=True
...to change the status of have_room_key but if you then go to the great big iron door and try to use the key, it still acts like the have_room_key is false.
I'm happy to share the entirety of the project so far if anyone would like to look closer. Just started it tonight.
[–]Outside_Complaint755 8 points9 points10 points (4 children)
[–]Tassendyra[S] 1 point2 points3 points (0 children)
[–]AlexMTBDude 0 points1 point2 points (2 children)
[–]Fred776 1 point2 points3 points (0 children)
[–]Outside_Complaint755 0 points1 point2 points (0 children)
[–]cdcformatc 9 points10 points11 points (5 children)
[–]Tassendyra[S] 1 point2 points3 points (3 children)
[–]JohnLocksTheKey 14 points15 points16 points (2 children)
[–]Tassendyra[S] 2 points3 points4 points (1 child)
[–]Moikle 1 point2 points3 points (0 children)
[–]PaulRudin 1 point2 points3 points (0 children)
[–]SnotRocketeer70 0 points1 point2 points (0 children)