eternal-space/objects/obj_laser/Collision_obj_rock.gml

36 lines
681 B
Plaintext
Raw Normal View History

2021-08-02 13:17:58 -04:00
/// @description Insert description here
// You can write your code in this editor
instance_destroy();
with(other){
instance_destroy();
repeat(15){
instance_create_layer(x,y,"Instances",obj_dust);
};
if(sprite_index == spr_rock){
2021-08-10 00:07:54 -04:00
var one_out_of_ten = choose( irandom_range(1, 10));
if(one_out_of_ten == 2){
2021-08-02 13:17:58 -04:00
instance_create_layer(x,y,"Instances", obj_life);
};
repeat(3){
var child = instance_create_layer(x,y,"Instances", obj_rock);
child.sprite_index = spr_rock_s;
};
};
};
with(other){
switch(sprite_index){
case spr_rock:
score += 900;
case spr_rock_s:
score += 100;
break;
};
2021-08-01 20:37:02 -04:00
};