This is a bit complicated, so I'll try my best to explain. At one point in my current storygame, the player is given a puzzle box they're supposed to open in order to progress. It has six buttons which each have to be pushed a certain number of times. The catch is, each button can only be pressed after certain other buttons have been pressed, (unless it's the first one to be pressed). For example, button A can only be pressed right after button B or C has been pressed, or else the puzzle resets. I've been using variables to track how many times each button has been pressed, but for some reason they're not working. They just sit there at zero, no matter what link is pressed.
As if that wasn't enough, when I try to put the box away it just gives an error message. (It uses a LASTPAGEID variable and sets the DEST to it when the back link is pressed).
Any suggestions? If need be I can paste the scripting into this post, but I'd rather not if I can avoid it. (There's a lot of it).
The variable is only supposed to be restricted if the button has been pressed the required amount of times, but if the wrong one is pressed, the puzzle should reset. I just set the link to add one to the variable each time it is pressed, then used conditional statements in the scripting to tell it to reset if certain buttons hadn't been pressed before. Now that I'm putting it in writing I realize it might just be a problem with the fact that I'm not scripting the whole thing. Before I go test that, do you know if that might be a problem?
As for the error, it says "object reference not set to an instance of an object."
Where would I put the @ in that script?
The link script looks something like this:
$DEST := %LASTPAGEID
I tried putting the @P in front of the variable, but that didn't work. Sorry I couldn't explain it a bit better, it's hard to articulate.
Oops, sorry. I'm a total idiot. i put it as $DEST := @P%LASTPAGEID. Thanks for all the help!
Next time I should actually re-read the article instead of relying on memory, lol