Posted: Sat Jan 09, 2010 3:36 pm Post subject: How do you randomize pictures?
Initially I wanted to randomize strings... but I don't think it's possible. This is actually for a multiple question, but I can do the button wait procedure or something so I'll let the user click on the answer.
Sponsor Sponsor
TheGuardian001
Posted: Sat Jan 09, 2010 4:11 pm Post subject: Re: How do you randomize pictures?
You do randomized pictures the same way you do randomized strings.
Then generate a random number to decide what picture to display:
Turing:
var tmp :int:= Rand.Int(1,10) Pic.Draw(myPics(tmp),x,y,picMode)
The same can be done with strings by changing the array into a string and replacing Pic.Draw with put.
Wintermini
Posted: Sat Jan 09, 2010 4:20 pm Post subject: RE:How do you randomize pictures?
OMG THANK YOU!!!
saranya
Posted: Thu Jan 14, 2010 9:20 pm Post subject: RE:How do you randomize pictures?
can u help me with making my pictures not repeat
Carey
Posted: Thu Jan 14, 2010 10:35 pm Post subject: RE:How do you randomize pictures?
You would have to store all previous numbers in an array, then when you pick a number, check the array to make sure it hasn't been picked before. Alternatively, you could take your array of pictures and do a bunch of random swapping to mix the order up, then use a for loop to display them from 1 to 10
TheGuardian001
Posted: Thu Jan 14, 2010 10:38 pm Post subject: Re: RE:How do you randomize pictures?
saranya @ Thu Jan 14, 2010 9:20 pm wrote:
can u help me with making my pictures not repeat
No, because I have no idea what you mean by that. Care to elaborate?