Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
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
For example I have two scenarios X and Y.
When a button is pushed I want it so X pops up on the screen 80 percent of the time when the other 20 Y pops up.
Thank you for your help!
IF random(100) < 80 do X
ELSE do Y
Develop games in your browser. Powerful, performant & highly capable.
Thanks I tried it, kinda worked, but I want to do something like SetText: X 80 percent of the time and Y 20 percent (it is not a condition but an action so can not do else)
You could use the choose() expression..
choose(x,x,x,x,y) should make 20% chance of y against 80% chance of x
Use conditional expressions (essentially an if/else)
Set Text: random(100)<80 ? "" & X : "" & Y
thankyou everyone it now works
This was asked before, solution with capx if you still need them. Cheers!