eternal-space/objects/obj_laser/Collision_obj_rock.gml
array-in-a-matrix 01304902bc code stuff
2021-08-02 13:17:58 -04:00

36 lines
673 B
Plaintext

/// @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){
var extra_life = choose( irandom_range(1, 10));
if(extra_life == 2){
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;
};
};