rapta
11-20-2006, 10:30 PM
hey, at the moment i am working on an explosion, and i have created 6 different pieces of geometry, to act as pieces of debris. when i instanced these pieces of geometry to my particle object it will by default use the piece of geometry at 'position 0' in the list of objects, what i was trying to do is have it randomly select what piece of geometry it will be at birth, i read you can do this using the ObjectID attribute, so i created a custom attribute with a creation expression to randomise this and then set ObjectID to get its input from this expression, but it kept telling me there was and executeable error on the particleShape! has anyone got this randomisation to work before? or know of how to get this to work?
the expression i used was;
int $particleChoice[] = rand(0,5);
particleShape2.particleSelect = $particleChoice[];
cheers
the expression i used was;
int $particleChoice[] = rand(0,5);
particleShape2.particleSelect = $particleChoice[];
cheers
