Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Game development stories & opinions
I wander if it is possible for a variable to somehow store more then one number without parsing them trough tokens later. Basically I'd like to store values that are used later in Random expression as (n,n2) and then use them like this : random(variable). Is that possible?
Tokens are nice to work with though.
variable(text) = str(n1)&"//"&str(n2)&"//"
n1 = int(tokenat(variable(text),0,"//"))
n2 = int(tokenat(variable(text),1,"//"))
r = random(int(tokenat(variable(text),0,"//")),int(tokenat(variable(text),1,"//")))
Develop games in your browser. Powerful, performant & highly capable.
I think the answer is no, but it shouldn't really be a problem. random() will accept number values, but not strings. Like 99instances2Go says, either just use tokens (they're easy) or just plug two separate variables into the random expression, as in random(variable1,variable2).
Can still use Cantor pairing.
I would like a cantor plugin.