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
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hey all. I know there's the expression random(0,3) to select a random numbers. But I'm not sure how to do the same with text variables? Is that even possible? I'm trying to make an enemy spawn and moveto either location 1, 2 or 3 essentially. I'm using Rex moveto plugin for this. Thanks for checking out this post. Here's the code!
Develop games in your browser. Powerful, performant & highly capable.
I'm not sure how text variables relate to that code as there is no text object but yes you can set a text variable to a random range in the same way.
you can use:
and it will randomly pick one from the list... and assign it to a text variable or use it in a condition in an event, etc.