I need a secret passage from room1 to room2 or room3, depending on a certain condition and by moving with the compass direction (east). I don't know if it's the easiest solution, but it's the one I found; If it helps.
What I did:
# room1 (>east)-> room2 (if flag or condition false)
# room1 (>east)-> room3 (if flag or condition true)
locations {
room1 : location "You are in a room1" ;
room2 : location "You are in a room2" ;
room3 : location "You are in a room3" ;
}
connections {
from, direction, to = [
room1, east_oneway, room2,
]
}
barriers {
block_secret : block_path {
from = room1
to = room2
gosub = secret_passage
}
}
booleans {
is_001 : boolean "false" ;
}
subroutines {
secret_passage : subroutine {
: if (is_001 == false) {
: print "You found a secret path to room 2" ;
: goto "room2" ;
: redescribe;
}
: else {
: print "You found a secret path to room 3" ;
: goto "room3" ;
: redescribe;
}
}
}