T
Toy-sparker
Guest
I was trying to make it when enemy breaks the block until global.block1_hp = 0 then it should switches to broken state but it just glitches out. I've tried everything to fix it. Basically what happens is the enemy is stuck cause the block is still in full state and it won't change to destroy state.
Code:
///scr_blck_full
if(global.block1_hp = 6)
{
sprite_index = spr_block1_full;
}
if(global.block1_hp = 4)
{
image_index = 3;
sprite_index = spr_blck1_breaking;
}
if(global.block1_hp = 2)
{
image_index = 1;
}
if(global.block1_hp = 0)
{
state = scr_blck_destroy;
}
Code:
///scr_blck_buildup
image_speed = 0;
sprite_index = spr_block1_dmg;
//if(build_level = 1)
//{
if(global.build_time = 0)
{
image_index = 0;
}
if(global.build_time = 2)
{
image_index = 1;
}
if(global.build_time = 4)
{
image_index = 2;
}
if(global.build_time = 5)
{
image_index = 3;
}
if (global.build_time > 5)
{
blck_state = scr_blck_full;
}
//}
Code:
///scr_blck_destroy
sprite_index = spr_blck1_breaking;
image_index = 0;
Last edited by a moderator: