Page 1 of 1

Mushroom Generator help.

Posted: Thu Apr 10, 2014 11:58 am
by Dragonmaster146
Is it possible to have block be able to be hit an infinite amount of times and spawn an infinite amount of mushrooms(1 per hit)?

Re: Mushroom Generator help.

Posted: Thu Apr 10, 2014 12:09 pm
by Emral
show [destroyed blocks] layer on hit

Re: Mushroom Generator help.

Posted: Thu Apr 10, 2014 3:03 pm
by Dragonmaster146
Emral wrote:show [destroyed blocks] layer on hit
That makes every destroyed block respawn. I want it to in a SINGLE Block.

Re: Mushroom Generator help.

Posted: Thu Apr 10, 2014 3:21 pm
by Chad
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.

Re: Mushroom Generator help.

Posted: Thu Apr 10, 2014 3:30 pm
by zlaker
Err I've one of those systems in my game. I just make a layer "Mushrooms" and put it over the block and make it generate every second. Then make a event called "More Mushrooms" and put the layer "Mushrooms" I'm Show Layer. At last make the layer hidden and add the event "More Mushrooms" to the block. Hope this was useful.

Re: Mushroom Generator help.

Posted: Thu Apr 10, 2014 3:31 pm
by FanofSMBX
Chad wrote: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.
Wouldn't this make the mushroom not move in a direction based on the direction the player is facing?

Re: Mushroom Generator help.

Posted: Thu Apr 10, 2014 3:46 pm
by Chad
Yeah, but I don't see how that'd be a problem. The direction could just be set to Random anyways.