Twine Version: version 2.3.12
Story Format: Sugarcube 2.34.1
I’m trying to build a system from the ground up that plays a bit more like a text adventure. I’m using some object oriented methodology to create room objects that can reference each other to determine which ways the player can be. I ran into a problem though where once I have two rooms pointing to each other, this is creating an infinite loop/infinite recursion. My best guess is that somehow, the rooms aren’t storing references to one another but creating new instances of each other, or something like that. I’ll put some example code below. If anyone could help, it would be greatly appreciated.
<<set $roomCaveEntrance.ports.northwest = $roomRavine>> <<set $roomRavine.ports.southeast = $roomCaveEntrance>>
The first line of code depicted works fine on its own. But once I have both, it crashes the entire game because of the looping involved. Any thoughts?