I suspect that this is going to be something I should have thought of... that or something that went over my head for lack of programming knowledge.
I have a Storymenu line linking to [Inventory]
Now, the Inventory, I actually have working. It's very basic, but fulfills all my needs for it... except a couple little hiccups.
1. I want to be able to turn a Lantern ($invlantern) on and off ($invlight)
2. I want there to be multiple available outfits the player can switch between. (displays "worn" in the inventory if you are wearing it. I can make that work)
In order to display the results of the player clicking on the lantern, or changing outfit, the Inventory page needs to be reloaded. Aaand there's the hiccup. As soon as the Inventory page loads again, it drops history. I can't use [back] because it would lose the Variable changes, and I can't use [return] because it causes a loop.
I did find this JS code, but every time I try to use it, I get "ERROR: State not defined" when the game tries to load.
My only thought would be finding a way to update the text without reloading the passage, but I'm still more than a little confused trying to figure out how to do that.
(at least I know which versions I'm using this time. XD )
I have a Storymenu line linking to [Inventory]
Now, the Inventory, I actually have working. It's very basic, but fulfills all my needs for it... except a couple little hiccups.
1. I want to be able to turn a Lantern ($invlantern) on and off ($invlight)
2. I want there to be multiple available outfits the player can switch between. (displays "worn" in the inventory if you are wearing it. I can make that work)
In order to display the results of the player clicking on the lantern, or changing outfit, the Inventory page needs to be reloaded. Aaand there's the hiccup. As soon as the Inventory page loads again, it drops history. I can't use [back] because it would lose the Variable changes, and I can't use [return] because it causes a loop.
I did find this JS code, but every time I try to use it, I get "ERROR: State not defined" when the game tries to load.
predisplay["Menu Return"] = function (taskName) {
if (! tags().contains("noreturn")) {
State.variables.return = passage();
}
};
My only thought would be finding a way to update the text without reloading the passage, but I'm still more than a little confused trying to figure out how to do that.
(at least I know which versions I'm using this time. XD )