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!
Develop games in your browser. Powerful, performant & highly capable.
something like
IF random(100) < 80 do X
ELSE do Y
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
Tombufa
Use conditional expressions (essentially an if/else)
For example,
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!