Discuss Scratch

Koopa-Games
Scratcher
11 posts

Mario Bros (1983) Arcade Help.

SO I've been working on my very own Mario Bros (1983) game. I'm using clones for the bits of terrain that you can hit, and I'm having some trouble with the shellcreepers. They don't flip when the block underneath them is hit. How do you make it so the shellcreeper flips over when the block is hit. (P.S I'm also using clones for my enemies)
Rangnarok
Scratcher
29 posts

Mario Bros (1983) Arcade Help.

You could check every time a block is hit, if the Koopa's x position and y position is equal to the block being hit. Something like:
Block:
when green flag clicked
set [blockhitx] to [null]
set [blockhity] to [null]
when I start as a clone
if <(a block just got hit) = [1]> then
if <touching [mario] ?> then
set [blockhitx] to (x position)
set [blockhity] to (y position)
wait (0.05) secs
set [blockhitx] to [null]
set [blockhity] to [null]
end
end
Koopa:
when I start as a clone
forever
generic koopa movement for one frame
if <not <(blockhitx) = [null]>> then
if <(([abs] of (y position)) - ([abs] of (blockhity))) < (how high above the block the koopa is to get hit)> then
if (([abs] of ((x position) - (blockhitx))) < (the x range the koopa has to be in to get hit)) then
flip over
end
end
end
end

Last edited by Rangnarok (Feb. 12, 2022 20:34:34)


when green flag clicked
forever
play [Minecraft]
play [Hollow Knight]
play [Undertale]
play [Deltarune]
play [TLoZ BotW]
play [TLoZ TotK]
play [It Takes Two]
play [Geometry Dash]
play [Terraria]
code [Scratch]
code [C#]
end

when [russia] > [ukraine]
if <[russia] invades [ukraine] ?> then
repeat until <([state] of[russia]) = [peace]>
̶p̶e̶n̶ foot down
replace item [state] of [putin] with [snitch]
globally [protest]
end
end

RUUUUNNN ITS THE EVIL KUMQUATS













You didnt need to scroll all the way down here btw…

Powered by DjangoBB