I'm trying to write a simple RPG, and I've encountered a problem.
I have an equip screen set up like this:
<<for _slot range $activeslots>>
<<link "Unequip _slot.name" "$passage">>
<<Remove _slot>><</link>><br>
<</for>>
When executed, it outputs something like this:
Remove helmet
Remove jacket
But whatever line I click, it only unequips the last item in the list.
Now, I understand why it happens; when generating lines, the program iterates through every non-empty slot in succession, but by the time I click on it, the _slot is already set to the last non-empty slot.
The question is, is there a way to fix it? Something that will allow every line to "remember" what value of _slot it was generated with, and call Remove with correct args?
Thanks in advance!