Sprite: spr_ghost
Solid: falseVisible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code: clicked=false; score=0; x=random(room_width);//jump to random position y=random(room_height);//jump to random position image_index=0; image_speed=0.5;
Step Event:
execute code: //jump to new position on animation end if floor(image_index)==29//if animation complete { clicked = false x=random(room_width);//jump to random position y=random(room_height);//jump to random position image_index=0; image_speed=0.5; } //add to score if clicked if position_meeting(mouse_x,mouse_y,id) && mouse_check_button_pressed(mb_left)//if mouse clicked over object { if(!clicked){ score+=1; clicked = true } }