This is Harlowe
I've done almost a whole game, based around a singular tree but what you click on (good/bad/indifferent links) changes your overall $score
A score of 70+ should take you to a "light" ending. Less than 30 is a "dark" ending and anything between 31-69 is a "grey" ending.
Unfortunately it's just not working.
This is my code:
(link-reveal:"What would it take to just admit to your demons and let them exorcise you?")[(if: $score is <= 30)[(goto:"dark ending")
dark ending](elseif: $score is <= 70)[(goto: "grey ending")
grey ending](elseif: $score is <= 200)[(goto: "light ending")
light ending]
The link doesn't even work, which is endlessly frustrating to me.
What am I doing wrong, please?
(Bonus question: I've used a stylesheet to make the background black, the text white and the links ((link-reveal:) for example) a grey colour.
But my "<a href="link">thing</a>" links are still dark blue. How do I change the colour of those?)
Comments
I'm not coding in Harlowe but how about something like that:
The"{" and "}" are there to suppress linebreaks and while (a) my example does what I think you try to do (and in Harlowe, to boot) I also think the "code" is more readable than those layered conditions inside of one link in your not working example.
A modified version of Harald_Schuster's example:
Ah, a thing to keep in mind should I ever finish with my current project and try to do one in Harlowe (which has some really appealing aspects, I have to admit).
I wasn't too sure about what contitional statements would work in front of a hook and which would not, that's why I went with the if, if, if cascade.
Since you're saying that else-if works (which means it's not just a local test but is aware of the failed test before) ... shouldn't a simple "else" then take care of the final check?
Beyond that, the way the conditions are currently written a few score values are unrepresented. The scores 30 and 31 are not given an ending based on the current logic. I'm assuming that it should be something like the following instead: