Order of items in an array

14 views
Skip to first unread message

Rabbit Stoddard

unread,
Jul 2, 2015, 12:46:23 AM7/2/15
to twee...@googlegroups.com
Question for Harlowe folks! 

I have an array that adds values as the user moves through passages. The order in which they visit the passages is important. So I want to compare two indexes of values in an array using an if statement, something like this: 

(if: $myvar.indexOf("room 1") < $myvar.indexOf("room 2")[things look bright!](else:)[you are eaten by a grue]

however, either .indexOf doesn't work, or it doesn't work like that, or there is something that I am missing, or I need to write a macro, at which point I'm not entirely sure where to begin. Any thoughts/assistance on this would be most appreciated. Thanks! 
Reply all
Reply to author
Forward
0 new messages