global proc splode(int $num, float $speed) { for ($p=0;$p<$num;$p++) { float $randTrans[] = sphrand($speed); string $cube[] = `polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1`; expression -s ($cube[0]+".translateX = time*"+$randTrans[0]+";\n" +$cube[0]+".translateY = time*"+$randTrans[1]+";\n" +$cube[0]+".translateZ = time*"+$randTrans[2]+";") -o $cube[0] -ae 1 -uc all ; } }