If you are requesting technical assistance with Twine, please specify:
Twine Version: 2.3.9
Story Format: Sugarcube 2.31.1
So I found a thread on here about how to make multi color links. That part works fine, but I’m trying to get the link to set a variable as well as advancing to the next passage. As I have it now, “Confidence Point” is in a specific color (here class=“confidence”) and I want clicking on the link to subtract one of the player’s confidence points.
<<if $you.confidence gte 1>>OR you could <<nobr>><a data-passage="monday 2-counseling2a" class="link-internal" tabindex="0"> SPEND a <span class="confidence">Confidence Point</span> to choose any of these options.</a><</nobr>><<set $you.confidence-=1>><<else>><</if>>
Problem is the Confidence Point is being automatically subtracted when the passage containing this link loads, not when the player clicks on the link. Any ideas?
Your help, as always, is greatly appreciated!