MFGG Forums
I put in a retro Hammer Brother, but he Doesn't act completely right. - 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: I put in a retro Hammer Brother, but he Doesn't act completely right. (/showthread.php?tid=2767)



I put in a retro Hammer Brother, but he Doesn't act completely right. - Videogamejunkie443 - 09-02-2021

I'm sorry for asking, as I really want to contribute to my project, but maybe I can learn something from you guys. I made a retro Hammer Bro (The SMB1 NES version), as I plan to include nostalgia worlds in my games. However, they keep bumping into the bricks above them. they can jump onto them, however. Before trying the current method, I used some modified code from Gatete's Super Mario Bros. Engine. the issue with that was the bros. would sometimes step off of a brick and onto the air. And when I alter the code to make it similar to the SMB Engine's Code, When the bros. jump on top of the blocks, they don't wanna go back down.
 
Here's the code (It's actually what the Normal Hammer Bro, which I left untouched, UsesSmile 

///Jump

//Jump higher if a block is above
if collision_rectangle(bbox_left,bbox_top-40,bbox_right,bbox_top-40,obj_blockparent,0,0)
{
    vspeed = -7
    alarm[4] = 2
    alarm[5] = 16
}
else
    vspeed = -4

//Boost jump
y--

//Gravity
gravity = 0.25

//If a block is below, jump through it
if collision_rectangle(bbox_left,bbox_bottom+8,bbox_right,bbox_bottom+8,obj_blockparent,0,0)
{
    alarm[4] = 28
    alarm[5] = 45
}

//Jump again
alarm[1] = 150

and here are the Mask and Sprite Properties for the walking and throwing sprites:

https://drive.google.com/file/d/19VuspZSVsirppwaXedHJwVGteNQxuSv3/view?usp=sharing

https://drive.google.com/file/d/176o4M3v6ApIwlBvYLHS2IdWHzfnDt7Vv/view?usp=sharing

https://drive.google.com/file/d/1Nxu5d7muW7yjaqOH2oLzKQaI64RYyJFS/view?usp=sharing

https://drive.google.com/file/d/1-xfiGZfqQ_VU6LX81aAjiIhaLjnoip1t/view?usp=sharing

I'm upset that I asked MFGG for help because I want to show off some work that I did so I can slowly build a team, but I don't know much about GML, and I keep procrastinating when I should be taking my time to learn GML and start work on the crossovers I so desperately want to complete.


RE: I put in a retro Hammer Brother, but he Doesn't act completely right. - Videogamejunkie443 - 09-08-2021

I've probably said this numerous times, but I'M A MORON. The issue's fixed. I'll try to come back with a more complicated problem.


This forum uses Lukasz Tkacz MyBB addons.