So I'm here again, trying to piece together my "life sim" type game. Working through an area that requires the players to change clothes in a locker while they do something, then coming back to put the clothes back on.
This wouldn't be a problem if I didn't have lots of clothing options for my players.
I've tried to get around this by "storing" the variable output into another variable:
<<set $lastWornClothes = { passage: "$playerClothes.passage", desc: "$playerClothes.desc", picture: "$playerClothes.picture"}>>
<<set $lastWornUnderwear = { passage: "$playerUnderwear.passage", desc: "$playerUnderwear.desc", picture: "$playerUnderwear.picture"}>>
<<set $lastWornShoes = { passage: "$playerShoes.passage", desc: "$playerShoes.desc", picture: "$playerShoes.picture"}>>
So here, it takes the player's currently worn variables, and stores them. This works fine, and allows me to change clothes in the locker, and then come back.
However, when I attempt to reverse this:
[[Change back into your street clothes.|Locker][$playerClothes = { passage: "$lastWornClothes.passage", desc: "$lastWornClothes.desc", picture: "$lastWornClothes.picture"}]]
I get an error. That reads:
Error: <<print>>: bad evaluation: Maximum call stack size exceeded
In this instance, <<print>> is only showing <<print $playerClothes.desc>> or <<print $playerClothes.picture>>
I'm not sure what I'm doing wrong here.. I'd ideally like to have a single passage that I can use to "put everything back on" without having to have my players click back through all the various outfits. Honestly, it's now being referenced in so many places that I'm starting to lose track where I'm putting a "wardrobe" inventory that needs to be added to in the event I add new clothes.
Is there a simpler way of doing what I'm trying to do?