[Twine 2.1.3/Harlowe] How to pick a result from the table

0 votes
asked Nov 11, 2017 by badtaste (150 points)
Hi everybody,

I'm creating a game where, at the end, there is a table of failure/success of a player, depending on his behavior during the game (number of different items he or she collected etc). Is it possible to create that table, make twine check which conditions are met and then return result?

For example it looks something like this

food   equipment     valuables

2            2                      2

4           4                       4

6            6                       6


So it would check all the columns and return results from these "cells". If someone collected 4 food and equipment, but only 2 food, player would get "game over", but if player gets 4 of each resource, he gets "barely survived" title and so forth.



2 Answers

0 votes
answered Nov 11, 2017 by Deadshot (3,410 points)
I'm not sure I really understand your question, but do you know how to use variables?
0 votes
answered Nov 12, 2017 by Piply (480 points)

I think you're making this more complicated than it need be. Every variable needs to exceed a threshold in order to obtain the win-state of that threshold, am I correct? It doesn't matter if the player gets a perfect score in two of the columns; if they get a 1 in food, but 6's in the other two, they still get a game over?

Would this work for you?

(if: $food or $equipment or $valuables <= 2)["Game over."]
(else-if: $food or $equipment or $valuables <= 4)["You survived, but just barely."]
(else:)["Perfect score!"]


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.