View Single Post
  #2  
Old 09-22-2011, 07:26 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I think it would look better if you used particletypes and set specific colors (I.e: Red, Green, Blue, Yellow) instead of relying on "random" to generate a color.

PHP Code:
// Often generates odd/mainly white colors
red = random(0,1);
green = random(0,1);
blue = random(0,1); 
I believe it would work something like this:

PHP Code:
with (findimg(200)) {
  
temp.colorz = {
    {
1, 0, 0},
    {
0, 1, 0},
    {
0, 0, 1},
    {
1, 1, 0}
  };
  
emitter.particletypes = temp.colorz.size();
  for (
temp.i = 0; temp.i < emitter.particletypes; temp.i++) {
     
emitter.particle[temp.i].red = temp.colorz[temp.i][0];
     
emitter.particle[temp.i].green = temp.colorz[temp.i][1];
     
emitter.particle[temp.i].blue = temp.colorz[temp.i][2];
  }
} 
I'm sure you can apply this to other particle ideas as well. Nice work none the less.
__________________
Quote:
Reply With Quote