(Gamebook) Hidden Choices

DarkFantasy2017
22 Jan 2017, 05:08

Hello, everyone. I have a small design problem that I was hoping the community could help me with. Basically, I am writing a gamebook using Quest, and I want certain choices to only be visible to the player (and only be selectable) if certain pre-existing conditions that will be set up through variables and such are met. So, for example, an option to buy something in a store showing up only if the player had sufficient money to purchase the item. Is there a way to do this? If so, can someone enlighten me as to how this might be achieved? Thanks a lot in advance for any help with this topic!


Pertex
22 Jan 2017, 16:08

Easy to do with the text processor. Assuming that you are saving the amount of money in the attribute game.money you can do

{if game.money>10: You can go to the {page:store} now}

in the description field. In my example you need a page named 'store'


DarkFantasy2017
23 Jan 2017, 02:16

Thanks for your reply. So rather than using the "Add Link" feature in the Windows Program, I would instead use a line of code similar to what you have there for such things directly. I assume that I would need to use the Script and Text option for a given page to make the code functional?


Pertex
23 Jan 2017, 06:41

if you want to set or increase the attribute game.money you need the Script and Text option, if you jus t want to output the link you can do this in the description field of the page.


DarkFantasy2017
23 Jan 2017, 11:30

Oh, awesome. Thanks again!