string $cubeName[] = `polyCube`;
float $randX = rand(20);
float $randY = rand(1,20);
float $randZ = rand(20);
float $randRot[] = sphrand(360);
float $randWidth = rand(8);
float $randHeight = rand(8);
xform -t $randX $randY $randZ
-ro $randRot[0] $randRot[1] $randRot[2]
$cubeName[0];
setAttr "polyCube1.width" $randWidth;
setAttr "polyCube1.height" $randHeight;
//WORKING
global proc gamble (int $numGamble)
{
global int $money;
print ("in order to win, you must roll an even number\n");
print("You rolled "+$numGamble+" times!");
for ($g=0; $g<$numGamble;$g++)
{
print ("You have rolled " +$randNum+"\n");
int $randNum = rand(1,12);
if (($randNum == 2) || ($randNum == 4) || ($randNum == 6) || ($randNum == 8) || ($randNum == 10) || ($randNum == 12))
{
$money = ($money + rand(5,10));
print ("Winner winner chicken dinner!\n");
print ("Balance: $"+$money+"\n");
}
else
{
$money = ($money - rand(5,10));
print ("Sorry, you lost\n");
print ("Balance: $"+$money+"\n");
}
}
}
global proc balance ()
{
global int $money;
print ("You have $"+$money);
}
global int $money;
if ($money<=0)
{
print ("Warning! you are bankrupt and we highly recommend not gambling any further to avoid debt.");
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter