Hello! A bit new to programming here, but learning.
I'm working on an inventory system for a text RPG. I have the basic idea nailed down, but I'd like to make it more complex by adding multiple screens to it. I disabled the back arrow function for gameplay purposes.
It goes something like this:
Any Room (Check Inventory) -> Inventory Screen
So far, the Back button's code is this:
It works wonderfully if you don't click on any items or check your status. But otherwise, you get trapped in the inventory screen with no hope of ever escaping. I've tried playing around with some variables, but I'm pretty lost on how to go about doing things. How can I make it so that the Back button goes to the passage (i.e. the "room") that the player was last in?
I'm working on an inventory system for a text RPG. I have the basic idea nailed down, but I'd like to make it more complex by adding multiple screens to it. I disabled the back arrow function for gameplay purposes.
It goes something like this:
Any Room (Check Inventory) -> Inventory Screen
You look inside your inventory... (Item1) (Item2) (Item3) etc. ... (Status and Equipment) (Back)
So far, the Back button's code is this:
(link-goto: "Back", (history:)'s last)
It works wonderfully if you don't click on any items or check your status. But otherwise, you get trapped in the inventory screen with no hope of ever escaping. I've tried playing around with some variables, but I'm pretty lost on how to go about doing things. How can I make it so that the Back button goes to the passage (i.e. the "room") that the player was last in?