Hello,
I'm trying to figure out how to build a relationship matrix within Twine 2/Sugarcube 2. I feel I am missing something very basic here.
I have $people[$i] where my people are described. For starters they have attributes of $people[$i].id, $people[$i].business, $people[$i].age, $people[$i].gender, $people[$i].favoriteSportTeam, and so on. What I want to be able to do is add something like $relationship[$k].id (which would be a people[$i].id, $relationship[$k].relationship (mother, brother, friend, etc.) and $relationship[$k].relationshiptype (probably a numeric scale of -10 (hatred and loathing) to 10 (love and trust)).
Can you have multidimensional arrays in Twine/Sugarcube? If so, how exactly are they referenced? I've been struggling trying to word my searches to find an answer. My best guess is $people[$i].$relationship[$k].id (or other attribute), but that doesn't seem to be working.
Thanks!
I'm trying to figure out how to build a relationship matrix within Twine 2/Sugarcube 2. I feel I am missing something very basic here.
I have $people[$i] where my people are described. For starters they have attributes of $people[$i].id, $people[$i].business, $people[$i].age, $people[$i].gender, $people[$i].favoriteSportTeam, and so on. What I want to be able to do is add something like $relationship[$k].id (which would be a people[$i].id, $relationship[$k].relationship (mother, brother, friend, etc.) and $relationship[$k].relationshiptype (probably a numeric scale of -10 (hatred and loathing) to 10 (love and trust)).
Can you have multidimensional arrays in Twine/Sugarcube? If so, how exactly are they referenced? I've been struggling trying to word my searches to find an answer. My best guess is $people[$i].$relationship[$k].id (or other attribute), but that doesn't seem to be working.
Thanks!