Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create Event:
- ---------------------------------------------------------------
- image_speed = 0.1
- ready = 0
- ready2 = 0
- //This will make the block solid.
- mysolid = instance_create(x,y,obj_solidblock)
- Destroy Event: (Use this one on the brick block.)
- ---------------------------------------------------------------
- with (mysolid) instance_destroy();
- Step Event:
- ---------------------------------------------------------------
- if ((vspeed > 0) && (y > ystart-4))
- {
- //Add here the object you want to make appear on the block.
- y = ystart
- vspeed = 0
- ready = 2
- //Changes the sprite.
- sprite_index = spr_qblock_empty
- }
- if (ready == 1)
- vspeed += 0.5
- Begin Step Event: [?] Block
- ---------------------------------------------------------------
- if ((collision_rectangle(bbox_left,bbox_bottom,bbox_right,bbox_bottom,obj_player,1,1)) && (ready == 0))
- {
- vspeed = -4
- //Makes the block unable to be used.
- ready = 1
- }
- Begin Step Event: Brick Block
- ---------------------------------------------------------------
- if ((collision_rectangle(bbox_left,bbox_bottom,bbox_right,bbox_bottom,obj_player,1,1)) && (ready == 0))
- {
- alarm[0] = 2 <-- Destroy the object on that event and add some shard object on it.
- exit;
- }
Add Comment
Please, Sign In to add comment