Hi, all, me and my friend almost finished our first game. Unfortunately, I found one annoying bug.
We used rand function in our game (simulation of 2 dice with 6 edges, like in classical board games) for create a stat-checks in game. Throws two “dice”, they added buffs and the resulting number is compared with the number of checks. But in the page after this every time when player go to show stats, and after this go back to main game, this dice roll again and all a changes!!!
The best way to hide stats that I’ve figured out is to create a variable and set it to false when you want the stats to be hidden. Then you can set up the stat screen to only show those stats when the variable is true. It doesn’t erase the “show stat button”, but it can hide some stats while letting you show others.
His problem isn’t so much that he doesn’t want the players to be able to see their stats, it’s that every time they go to their stats page and back the *rand function rerolls because the page you’re on isn’t stored, it’s just reloaded, and the page rereads and reapplies all the code in it all over again. I’ve had the same problem even without a *rand, with a stray “oh I’ll add a +20 here,” and then every time you would go to your stats page and back it would increase by 20!
The simple solution is to roll it well in advance. If that’s not possible though, you’d have to use a *goto or *page_break or