Postby Chad » Thu Apr 10, 2014 3:21 pm
First off, you'll need to have a question block graphic replace a block that can be hit an infinite number of times, such as a note block or block-159 (the blue one in SMB3>Special). Create two events, I'll call them "Block Hit" and "Hide Generator".
"Block Hit" will be triggered upon hitting the block, and activate a Mushroom generator placed on top of the block. Set its delay to 0.1 so there isn't a gap between hitting the block and the Mushroom appearing. Make this event play the Mushroom sound as well.
In 0.5-1 seconds (enough time for a single Mushroom to fully spawn but without creating another), "Block Hit" should trigger the "Hide Generator" event, which of course hides the Mushroom generator. Doing all this will result in the block spitting out one Mushroom with each hit, although you might have to play with the delay numbers a little to make it consistently give you exactly one.
Alternatively, you could have "Hide Generator" be triggered by a delay event that works off of the Mushroom's "Activate" trigger instead.