-
What I have is a scrolling type background. I have balls that move from the left side off the right hand edge. After the ball passes completly off the right edge, I reassign its _x value so it is back on the left hand side. What I am wondering, is there a way so that everytime I reassign the _x to the left hand side, can I also assign a Random RRGGBB value?? And if so, is there a way that I can limit the value. Kind of how you can limit the random in between two numbers using random(50)+100. Can I set it where the value of the colors will be random but only between like... #005555 and #66AAAA ???
Any help is greatly appreciated.
-
use
color_object = new color(MC);
color_object.setRGB(random(256)<<16|random(256)<<8 |random(256));
of course u can use variables instead of those random(xxx) to implement more complicated random events
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|