Alright, so this is my first twine game, and anyone who bothers to check will can see that I made this account a sole 5 minutes ago, but I'm really at a loss here. But don't worry, I've lurked enough to not be a complete pain.
I'm using Twine 2 with Harlowe because as it will soon become apparent, i'm really not a coding expert. At all. Most of what i've done has been through osmosis of various tutorials, and...I'm having a lot of problems, But I just go with this one first.
In the game i am creating, there's a fair bit of "open world exploration", as in there's a passage that acts as a hub (The Pod), at three main locations to visit (The Docks, The Forest, The Village). What I'm trying to do is create conditions that must be met in order for certain passages to be read for the player to proceed. The scenario is pretty much: Player must meet 3 conditions, "accessed_village" + "accessed_dock " + "accessed_forest" to 'notice something they missed when previously at an area and have the option to go to a previously unseen passage. to do this, i'm creating a-not-really item that is added to the players $inv array, so that when the conditions are met it shows up.
it looks like this:
(set: $inv to $inv + (a: "accessed_dock"))
repeat in two more locations (yes, i've checked spelling) annnnd:
(if: $inv contains "accessed_village" + "accessed_dock " + "accessed_forest")[Oh, and there's a dog wearing a scarf watching you from under cafe table.]
Now- I have created something similar: alternate text based on what item the player chose to take earlier in the game, using stat values (picking up object put the item into the $inv array, as well as a value for a stat (the game has three stats that effect stuff, basic if/elseif/elseif ) AND THAT WORKED. The array method does not.
So if you've gotten through all of that, my question is, how can I use arrays to if/else conditions, so the player is able to "unlock" new dialoge by preforming tasks (which I could assign values i suppose), or having 'items' in the $inv array?
I'm using Twine 2 with Harlowe because as it will soon become apparent, i'm really not a coding expert. At all. Most of what i've done has been through osmosis of various tutorials, and...I'm having a lot of problems, But I just go with this one first.
In the game i am creating, there's a fair bit of "open world exploration", as in there's a passage that acts as a hub (The Pod), at three main locations to visit (The Docks, The Forest, The Village). What I'm trying to do is create conditions that must be met in order for certain passages to be read for the player to proceed. The scenario is pretty much: Player must meet 3 conditions, "accessed_village" + "accessed_dock " + "accessed_forest" to 'notice something they missed when previously at an area and have the option to go to a previously unseen passage. to do this, i'm creating a-not-really item that is added to the players $inv array, so that when the conditions are met it shows up.
it looks like this:
(set: $inv to $inv + (a: "accessed_dock"))
repeat in two more locations (yes, i've checked spelling) annnnd:
(if: $inv contains "accessed_village" + "accessed_dock " + "accessed_forest")[Oh, and there's a dog wearing a scarf watching you from under cafe table.]
Now- I have created something similar: alternate text based on what item the player chose to take earlier in the game, using stat values (picking up object put the item into the $inv array, as well as a value for a stat (the game has three stats that effect stuff, basic if/elseif/elseif ) AND THAT WORKED. The array method does not.
So if you've gotten through all of that, my question is, how can I use arrays to if/else conditions, so the player is able to "unlock" new dialoge by preforming tasks (which I could assign values i suppose), or having 'items' in the $inv array?