For my story "Cabin 49," I'm trying to add variables to links. I've added one variable restriction to a link and tested the game out. It didn't work. So I decided to make the link visible when restricted. Tested the game again. Didn't work.
I proceeded to recreate the links and the restrictions. Tested the game. Didn't work.
I continued to write some more on the story, and I came to a part where I had to make another variable restriction. The variable script in the page worked just fine, but the variable restriction on the link refused to work.
Explain a bit more. Variable restrictions, in my experience, did and still do work. If the link isn't being restricted, then it's either incorrectly set up, or the variable isn't at the right value when the restriction is evaluated.
The variable is called PACKINGUP, where the max value is three (3 for three extra items to pack)
The variable restriction (as shown in the editor):
PACKINGUP <= 2 Or
The link is also visible when inactive, as stated in the first post. I do have a feeling I fucked something up somehow.
If there's no other condition besides PACKINGUP <= 2, uncheck "Or".
Y'know, this happened to me too.
I've got variables A-G, and a link that's only supposed to be visible if A=1 or B=1
So I've got the link with variable restrictions [A=1 with or checked] and [B=1 with or checked.]
But the link shows up all the time. Am I not understanding how or works?
With both ORs checked, does that change it to an AND?
It isn't "and" because Neither variable equals one. The only workaround I found was making one link a=1 and another link b=1 that both go to the same place.
It seems that anything checked OR in a condition is put in a pool and tested together, and if none of those are true, the system goes on to test if the remaining conditions are true. But if everything is marked as OR, there are no conditions remaining to test against afterwards, and a lack of conditions is evaluated as "true".
When evaluating multiple OR conditions, one must be unchecked.