MFGG Forums
New Game Maker 8.1 Engine - Printable Version

+- MFGG Forums (https://forums.mfgg.net)
+-- Forum: MFGG (https://forums.mfgg.net/forumdisplay.php?fid=4)
+--- Forum: Developer Discussion (https://forums.mfgg.net/forumdisplay.php?fid=10)
+--- Thread: New Game Maker 8.1 Engine (/showthread.php?tid=2089)



New Game Maker 8.1 Engine - Bully With a Hat - 09-10-2019

I made a new engine in GM8.1, and it's going pretty well, except for the semi-solid platforms and Mario taking damage.  Some of the semi-solids work fine, but when the get to a certain y-level, it acts like a regular solid platform. Whenever Mario takes damage, the game freezes.  I need help, so I'm posting a beta build so you can see the code.

http://www.mediafire.com/folder/jnu2t2d9b78qx/Neo_Bully_Mario_Engie_Beta_1

I hope you can help!

Also, another bug: When I stomp a Galoomba, all of them disappear instead of just the one.


RE: New Game Maker 8.1 Engine - Jeff - 09-10-2019

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:
Code:
if (instance_exists(obj_parplayer))
{
    instance_create(obj_parplayer.x, obj_parplayer.y, obj_deadmario)
    alarm[0] = 1;
}
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:
Code:
if (place_meeting(x, y + vsp, obj_parenemy)) && vsp > 0
{
    vsp += -10;
    with(obj_parenemy)
    {
        instance_destroy();
    }
}
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:
Code:
var enemyId;
enemyId = instance_place(x, y + vsp, obj_parenemy);
if (enemyId != -1 && vsp > 0)
{
    vsp += -10;
    with(enemyId)
    {
        instance_destroy();
    }
}



RE: New Game Maker 8.1 Engine - Bully With a Hat - 09-10-2019

OK, thanks for the help!


This forum uses Lukasz Tkacz MyBB addons.