09-10-2019, 02:45 PM
I'm not sure about the semi-solid blocks, I couldn't reproduce the problem.
Whenever Mario takes damage, the game freezes.
In obj_deadmario's creation event:
you're creating another instance of obj_deadmario, which creates another obj_deadmario and another, and this repeats forever. Or until GM realizes that it's stuck and crashes.
When I stomp a Galoomba, all of them disappear instead of just the one.
In scr_damage:
you're destroying every instance of obj_parenemy. If you want to destroy only one, you'll need to get its id and destroy that. Something like this:
Whenever Mario takes damage, the game freezes.
In obj_deadmario's creation event:
Code:
if (instance_exists(obj_parplayer))
{
instance_create(obj_parplayer.x, obj_parplayer.y, obj_deadmario)
alarm[0] = 1;
}
When I stomp a Galoomba, all of them disappear instead of just the one.
In scr_damage:
Code:
if (place_meeting(x, y + vsp, obj_parenemy)) && vsp > 0
{
vsp += -10;
with(obj_parenemy)
{
instance_destroy();
}
}
Code:
var enemyId;
enemyId = instance_place(x, y + vsp, obj_parenemy);
if (enemyId != -1 && vsp > 0)
{
vsp += -10;
with(enemyId)
{
instance_destroy();
}
}