It works, but i want it to do the same to objects that are further in the row, it only takes out three even if there are four in the line.
I have this in the create event:
sprite_index=choose(spr_blue, spr_red)
if sprite_index=spr_blue{color="blue"}
if sprite_index=spr_red{color="red"}
alarm[0]=20And I have this code in the step event:
var k1,k2;
k1 = instance_position(x+96,y,obj_tile)
k2 = instance_position(x+192,y,obj_tile)
if (k1 != noone && k2 != noone){
if (k1.color=color && k2.color=color){
with (k1) instance_destroy();
with (k2) instance_destroy();
instance_destroy();
}
}My friend (Schreib, thank you) helped me with the step event script, and yes, i understand whats going on in it.
How would i go about to make all the objects in a row explode? This is both horizontally and vertically. NOT diagonally.
If i forgot to mention anything, please tell me.
Thanks in advance~
















