////creation

particleShape1.cyclePP = trunc(rand(0,3));

particleShape1.orientPP = <<0,rand(360),0>>;

float $randScaleNum = rand(.5,1);

particleShape1.customScalePP = <<$randScaleNum,$randScaleNum,$randScaleNum>>;

if (particleShape1.cyclePP == 0){

particleShape1.customIndexPP = 0;

}

else if (particleShape1.cyclePP == 1){

particleShape1.customIndexPP = 100;

}

else if (particleShape1.cyclePP == 2){

particleShape1.customIndexPP = 200;

}

////runtime

particleShape1.orientPP += <<.5*(sin(time*5)),0,.5*(cos(time*5))>>;

if (particleShape1.cyclePP == 0){

particleShape1.customIndexPP += 1;

}

if (particleShape1.cyclePP == 1){

particleShape1.customIndexPP += 1;

particleShape1.mass = .75;

}

if (particleShape1.cyclePP == 2){

particleShape1.customIndexPP += 1;

particleShape1.mass = .5;

}

Thank you for posting this tutorial! The results look terrific.

ReplyDeleteI'm getting a syntax error when I try and plug in the runtime part. I'm a bit of a noob, and not too familiar with the language to know how to fix it on my own.

Again, thanks for posting these, as a student resources like this help tons. :)

Abrasan-

ReplyDeleteThank you for your comment!

It looks like I forgot to put a semicolon after the lines that set mass. I put those in there and it should work now. Let me know if you have any other problems or questions or tutorial requests.