I have designed a random labyrinth-maker, that populates a 2d grid/sets gates open closed etc, chooses a random direction and checks if visited before etc.
Now it works fine if i link the twine pages with
link->link but when i try to automate it (60 keypresses before a game would be tiresome!) by linking with (print:"link") it gets the wiggins, bugs out and panics that it's trapped in an infinte loop!
Any idea how this can be avoided?
Comments
You're going to need to show your code. We can't tell you exactly what the issue is if we can't see the code.
PS: Please use the code tag when posting code or markup—it's C on the editor bar.
I'm using Twine 2.1.0 and using Harlowe.
I'm attempting to attach a html file, it works - but you have to keypress through a whole load of turns until map completion, as i say replacing the link with a (print:"link") type command to automate it causes the program to assume a recursive infinite loop, whic it is not - the code otherwise does work. the "graphic" displays are purely for feedback to check the code is working, so it looks very untidy - but you'll get the idea. Any feedback/comments or suggestions would be most welcome!
<img src="http://twinery.org/forum/uploads/Uploader/57/3ae9e6b85e09465adbf9e7b0f0b14a.html" />
Your example uses a recursive displaying of the random direction passage to simulate a for $turns is 1 to 4 loop, I strongly suggest that you use Harlowe v2.0.0's (for: ) macro instead.
Thanks for the advice.