Didn’t even think of that, but since I always use parenthesis even on single variables as a matter of standard I never had trouble with choice conditions.
A quick question: can you successfully call a temp var that was declared in scene A, while in subroutine in scene B? And as an aside, do vars that were randomed in scene A retain their values in memory after the same gosub_scene? Or is it null return/reroll?
temporaries won’t be removed/deleted until you leave the scene it’s created. *gosub isn’t a “scene-leaving” action as you’re essentially keeping the scene in background, opening the sub-scene.
Then yes, you should be able to call the variable, as long as they don’t share a same name. I never tested this, though, as I never done recalling temps on other scene; *params exists.
Also yes to second question; they retain the randomized value (as long as the *return doesn’t put it through another *rand)
Quick question for I am noob. *line_break doesn’t seem to be workings anymore?
In the early stages of my coding I like to use a lot of *goto’s and whenever I try to line break now it won’t do it. Regardless of whether or not I put it after the choice dialogue, or right before the new dialog under the *label.
It has been a long time since I had to create a new stat screen. How do I code it when the variable isn’t going to show the same as what I call it in code? For example, to get the variable flex to show as Flexibility?
Is there any way to get a gaussian random number - i.e. a random number, but from a gaussian distribution so you have more chance of central numbers occurring than the extremes; rather than just “*rand [var] x y” which has an equal chance of numbers x to y.
edit: the only way i could think of doing something even remotely similar it is bodging something like:
*rand var 1 10
*if var < 5
*set var + 1
*if var > 5
*set var - 1
which just shifts the extremes towards the middle rather crudely & also means numbers 1 and 10 can never occur. not very satisfactory.
yah i thought about that but then the probabilities are just 1 in 12 for var to = 1-4 and 6-10 and 1 in 4 for var to = 5; which i think is further from what i want than 0 in 10 for 1 and 2, 1 in 10 for 2-4 and 6-9 and 3 in 10 for 5…if that makes sense.
really what i want is like a 1 in 30 chance of rolling a 1 or 10, a 1 in 20 of rolling a 2 or 9, a 1 in 10 chance or rolling a 3 or 8 etc
I imagine you would have to code the function itself, although I’m not sure CS understands pi or number e. Should probably define those to several decimals.
By all means, this is something I simply made up in mind. I’m not sure if the PDF has the variance you like, but you get the gist.
P.S. In case anyone is wondering why I would go out of my way to code a silly thing to simulate mathematics thing, it’s because I’m learning this very topic on uni rn.
Okay, so when I am doing a dieroller but want to add a stat to the result, how would that look in code form? I basically want it to be *set randroll +(Reaction) but somehow I expect it is not that easy.