Information about object: obj_roll_dice
Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code: rolling=false; dice1=1; dice2=1;
Alarm Event for alarm 0:
execute code: rolling=false;
Step Event:
execute code:
if keyboard_check_released(ord('R')) && !rolling
{
rolling=true;
alarm[0]=room_speed*4;
}
if rolling
{
dice1=irandom(5);
dice2=irandom(5);
}
Draw Event:
execute code: draw_sprite(spr_dice,dice1,200,200); draw_sprite(spr_dice,dice2,400,200); if !rolling draw_text(50,50,"Press R to Roll#Last Roll "+string(dice1+dice2+2));
No comments:
Post a Comment