I’ve got a weird problem happening with my test demo. As shown here, this is the HP value before entering the stats screen:
Then, once you go into the stats menu then come back:
This happens. The *set routine I have written constantly rolls again whenever I leave the stats screen. Is there a way to stop this from happening, or am I screwed?
Make another label that doesn’t have the command that’s changing that stat so the script stops there and doesn’t change the value every time it comes back.
Aaaah. I see. Yes, I am using rand. Damn. I figured it’d only roll once. Sorry, forgot to make that clear. Is there a way to lock the roll once the option is selected?
*rand rerolls every time you go to the stat screen.
What you need to do is use *rand before you actually need it. Like this.
*label random_roll
*rand die 1 6
You walk up to the table.
*page_break
You roll the dice and you get ${die}.
or if it’s rolled after a choice.
*rand die 1 6
*choice
#Attack with a sword.
You deal ${die} points of damage.
*goto next_scene
#Attack with an axe.
You deal ${die} points of damage.
*goto next_scene
Ah! Perfect. I spent a good two hours trying to figure this out before I gave up and came here. Thanks for the help as always, and thanks to all who chimed in. Cheers!
Yes, it happened to me before too, just one more thing you learn in the process. A lot of people have already gone through issues that may happen to you too, so don’t hesitate to look out for a similar problem on the forum, it probably has been answered somewhere already.