CODE
// eventProc
global proc eventProc (string $particle, int $Id, string $geoObj)
{
if ( ( $particleId == 120) && ($geoObj == "bucket1") ) {
setAttr ($geoObj + ".collisionCheck") 1;
}
if (($Id == 120) && ($geoObj == " bucket2")){
setAttr ($geoObj + ".collisionCheck")1;
}
if (($Id == 120) && ($geoObj == " bucket3")){
setAttr ($geoObj + ".collisionCheck")1;
}
};
Hi guys, basically all i want to do is have particles go into bucket1, when a certain amount of particles are in the bucket the bucket rotates spilling the particles out. I have added a collisionCheck attribute to the buckets and made the expression. If i manually put the collisionCheck to 1 on the bucket, the bucket spills, however i want it automated, and i thought the above event procedure would do the trick, however it doesnt seem to do anything.
As the particles are hitting the bucket i get this in the MEL window (this is just a small part):
eventProc( "particleShape1" , 64, " bucketShape1" );
eventProc( "particleShape1" , 64, " bucketShape1" );
eventProc( "particleShape1" , 65, " bucketShape1" );
eventProc( "particleShape1" , 65, " bucketShape1" );
This tells me the eventProc is doing something, but not working to what i need it to. I would appreciate any help and thanks in advance