Random Control

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ferhan24badshah
Posts: 35
Joined: Sun Feb 02, 2014 12:20 am

Random Control

Post by ferhan24badshah » Tue Jun 16, 2015 12:28 am

I want to randomly put either 1 or 2 in a variable x

I did this by..

put random(2) into x

How do I control the random selection in a way where neither 1 or 2 is selected more than 4 times. Thanks!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Random Control

Post by dunbarx » Tue Jun 16, 2015 2:43 am

How are you putting these numbers out? The way you do it will determine the way to limit the instances of each.

Craig Newman

Post Reply