Hi
I'm trying to create a simple map in Twine 2 Harlowe, however I am having difficulty (because i'm not very good at this). I'm trying to use (altering) Dan Cox method from Sugarcube to no avail. This is what i've done, trying different syntax.
Map system
(display: "Location")
(if: $mapArray($positionY-1 and $positionX) is 1)[
[[North]]]
(else-if: $mapArray[$positionY][$positionX+1] is 1)[
[[East]]]
(else-if: $mapArray(($positionY+1)($positionX)) = 1)[
[[South]]]
(else-if: $mapArray(($positionY)($positionX-1) = 1))[
[[West]]]
My array comes from here:
(set: $maparray to (array:
(0,0,0,0,0),
(0,1,1,0,0),
(0,1,0,1,0),
(0,0,1,1,0),
(0,1,1,2,0)))
(set: $positionX to 1)
(set: $positionY to 1)
Thoughts?
I'm trying to create a simple map in Twine 2 Harlowe, however I am having difficulty (because i'm not very good at this). I'm trying to use (altering) Dan Cox method from Sugarcube to no avail. This is what i've done, trying different syntax.
Map system
(display: "Location")
(if: $mapArray($positionY-1 and $positionX) is 1)[
[[North]]]
(else-if: $mapArray[$positionY][$positionX+1] is 1)[
[[East]]]
(else-if: $mapArray(($positionY+1)($positionX)) = 1)[
[[South]]]
(else-if: $mapArray(($positionY)($positionX-1) = 1))[
[[West]]]
My array comes from here:
(set: $maparray to (array:
(0,0,0,0,0),
(0,1,1,0,0),
(0,1,0,1,0),
(0,0,1,1,0),
(0,1,1,2,0)))
(set: $positionX to 1)
(set: $positionY to 1)
Thoughts?