Random Choose

Get help using Construct 2

Post » Wed Dec 28, 2011 2:53 pm

[code]Global variable list = "1|2|3|4|5|"
Global variable picked = 0
Mouse: On Left Click
   // pick on item at random
   -> System: set picked to tokenat(list,random(tokencount-1),"|")
   // delete this token from list
   -> System: set list to replace(list,picked&"|","")[/code]
Weishaupt solution is better if you want some items back afterward.Yann2011-12-28 14:55:57
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Dec 28, 2011 3:35 pm

thank everyone for your patience and your solutions ... I think I've got it.
B
4
G
1
Posts: 30
Reputation: 685

Previous

Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 17 guests