Making the on off blocks like in Mario maker 2

Untitled 01-20-2025 09-08-14

I’m not trying to copy Mario maker 2’s on off blocks. But I do want to make blocks like those. 3 of them. And there controlled by clicking on the buttons. Do you think that’s possible? Also, I want to know how to make the player go through the blocks when it’s at the outed line part.

If you have an awnser, please give me an image of it he coding you made please.

Hello. I won’t have time to create the code.

But you probably can. Try do this :

  • Detect when the mouse is over your buttons with the condition “The cursor/touch is on an object”
  • When this is detected (the action in front of previous condition) change the animation of your tile, and use “De/activate a behaviour”
1 Like

I already have that working. What I do not have working is how to make the on off blocks.

If you have that working, then what part are you still having trouble with? What @vfabien21 described is pretty much it - change the block’s animation and toggle the behaviour on or off.

Yeah. But there’s the part where the player can touch the blocks if they are transparent now. I’d tried doing that and it worked but the transparent block, I can only shrink down one tiny collision, and it still stays.

Are you shrinking the collision mask? If so, add a condition to the block collision event to check if the block is in the correct solid block animation.

What vfabien21 wrote and MrMen confirmed is exactly how i would see any1 suggest to you to do it
MAYBE going extra step would be to give buttons variable but that would be like giving it extra step for no reason

We have here 4 objects
Button red
Button blue
Block red
Block blue

Now you change animation of button red and blue to pressed not pressed

Depending on animation on button of some color you change animation of BLOCK of corresponding color to it animation index

And then by animation of BLOCK you either activate or de activate its platform behavior

If that does not work for you then show us what you did in your events

Cause from what you wrote so far i would assume that is all you asked for
BTW idk why you want to shrink that buttons you only want for player to go trough it
So what is the point of shrinking it?
You just make animation for it being solid and outlined
And when its solid it should have platform behavior enabled
When its outlined you de activate its platform behavior