How can I make the smb1 mushroom?

Godot Version

4.2.2 stable


How can I make the movement of the smb1 mushroom and make the player play the 1up sound when they touch it?

One great resource for sounds is of course

To play the sound do this you will need to use the AudioStreamPlayer of which there are many different variants and different ways to do it. One user here shared his MediaManager code as it allows sound to be played regardless of whether the object has been destroyed by queue_free().

While I am not sure about the mushroom movement, I suspect you will need to use the default character2D gd script and remove all the elements pertaining to user movement up/down left/right. Then adding RayCasting nodes to the mushroom scene to control movement a bit like this:

so it never gets stuck and keeps on moving. In case you are wondering that second Area2D collision is so the player can jump on an enemy.

Two great resources for sprites/spritesheets is:

HTH is some small way.

1 Like