Twine Version: 2.3.5
Story Format: Sugarcube 2.30.0
I’m writing a story where the player interacts with characters via relationship points (RP) that go up by 1 each time the player makes the right decision. I declared all my variables in the second page of the game (which is the tutorial). I declared all RP values like this:
<<set $carlyrp to 0>>
As the game goes on, the players makes a couple of decisions that add RP to Carly. When that decision is made, this happens:
<<set $carlyrp to $carlyrp + 1>>
Then we reach a point where Carly’s reaction to the player’s decision is dependent on how many RP the player has with her. Before I wrote this, I wanted to make sure that this counter was working, so I simply typed:
<<print $carlyrp>>
And nothing was actually printed. To better test this out, I made a more specific test. I wrote this:
<<if $carlyrp is 2>>hello
<<else>>bye
<</if>>
At this point in the story, I’m only ever testing if the RP value is 2, as those are the amount of points available. When I run the game, make both decisions that grant me the RP value of 2, this if statement actually prints bye instead of hello. I’m not sure why my counter isn’t working properly. Obviously, it should be printing hello.