Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

removing choice from a list if chosen

edited April 2015 in Help! with 1.x
I'm making a minigame with only a few screens, and am fairly new to twine (Using twine 1, sugarcane, mac osx)
I have a list of choices that are randomized, and the player is given a choice between "buy" and "don't buy"- either way, it goes back to the same page with the randomized list. If a player selects "buy", I want to be able to remove the choice that they bought from the randomized list, and once they buy 5 times, I want the game to be over. So most of this takes place within a single passage, but I'm not sure how to set up the variables to remove a choice once "buy" is selected, and how to make a counter that tracks how often someone clicks "buy".  I know this is a lot to ask, but if anyone can offer any direction whatsoever I'd be very grateful! thank you.

to clarify: i have a randomly generated list of items, once a player clicks the "buy" link I want that item to be removed from the list. is there a way to do this?

Comments

  • Check out greyelf's discussion of arrays here: http://twinery.org/forum/index.php/topic,2424.0.html

    You might also want to look at making it into a series of 5 identical passages, but remove the transition effects from each page, so you're transferring a user to a new page every time they click buy, but the lack of graphical updates makes that change invisible so it just looks like it is on the same page. If you did that, you could just do this with standard <<if>> statements on each page that measure what was done on each page and update accordingly.
Sign In or Register to comment.