I made a Bouncy ball Machine project, and I when you click it, I want it to choose a random ball and make it go to the door. If you know how to make a script that chooses a random sprite, PLEASE TELL ME!!!
Offline
when I receive [random ball v]
set [ball v] to (pick random [1] to [5]) //or the N° of balls you got
if <(ball) = [1]>
broadcast [ball 1 v]
end
if <(ball) = [2]>
broadcast [ball 2 v]
end
say [and so on]
Offline
technoguyx wrote:
when I receive [random ball v] set [ball v] to (pick random [1] to [5]) //or the N° of balls you got if <(ball) = [1]> broadcast [ball 1 v] end if <(ball) = [2]> broadcast [ball 2 v] end say [and so on]
Thanks!
Offline