0 votes
asked by (180 points)
Sorry for this question, I'm rather new to Twine, but how do I make certain choices unavailable if a player has not met a certain criteria? For example, my game has a stat called $mana, which is needed to cast spells. But I don't know how to stop the player from choosing to use spells when they don't have the mana to do it. Like is there any way to hide the choice, or disallow them from choosing it?  Thanks in advance!

2 Answers

+1 vote
answered by (125k points)
selected by
 
Best answer

You can use the (if:) related macros to check the current value of the variable to determine if a link should be shown or not.

eg. Assuming you only want to show the Fireball link if the $mana variable's value is 10 or greater.

(if: $mana >= 10)[
	(link: "Cast Fireball")[]
]

 

commented by (180 points)

Oh I see. Thanks so much for the advice! smiley

0 votes
answered by (5k points)
If you are new to twine, watch youtube vids and check this out:

https://twine2.neocities.org/
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...