But then if room = 1 and room_1_explored = true, you end up in an endless loop because *label reroll doesn’t actually reroll. And in the first one you’ll possibly end up with multiple “Next” buttons that just lead to seemingly blank pages if you keep rolling for rooms you’ve already explored. Which is why you gotta do it like this:
*label reroll
*rand room 1 10
*if ((room=1) and not (room_1_explored))
*page_break
*goto_scene room_1
*if ((room=1) and (room_1_explored))
*goto reroll
(Of course, a page break immediately after a choice is awkward, so either you write some prose for before the page break so it’s not, or you find a way to roll it before the choice…)
*label reroll
*rand room 1 10
*temp roomname
*if ((room=1) and not (room_1_explored))
*set roomname "room_1"
*if ((room=1) and (room_1_explored))
*goto reroll
*choice
#Choose a room.
*goto_scene {roomname}
#(Some other choices leading to non-random scenes)
That’s a fancy, but very useful trick that requires the very latest Choicescript update. And if you want it to only roll it once even IF you go to stats and back on the page where it actually rolls, although the player won’t notice because it’s Shroedinger’s room, you can make “roomname” a *create stat in the startup and keep it blank and put the whole randomizer underneath:
*if roomname = ""
(I haven’t tried it but I don’t think it’d work that way with a *temp? You can’t test a variable until it exists so you can’t use a != “” or = “” to gate the whole shebang, and I’m pretty sure *temp overwrites the old stuff that was in it to boot.)