I want to make a Legend of Zelda styled thing where there is an breakable block but it requires an item in order to break it.
How can I do this?
Also, I want it to be broken with a bomb.
Maybe a Conditional Branch which checks if there is an item in inventory or if one of the four actors have any item equped...
If you want to set the bomb near the breakable events you can do that by an extra event on the place where the bomb should be set.
Then there are two ways:
- set the bomb from inventory - you will need variables to check if the actor is in the correct location to set a bomb
- set the bomb when interacting with the breakable event. Again with Conditional Branching.
You would have an invisible event at any location where the Bomb can be placed, assuming they can only be placed at boulders; a Condition to the Event that a Bomb is in the inventory, and then a Player Action trigger that activates the Bomb; a Variable that decreases your Bomb total, a Self-Switch that changes the Event graphic to a Bomb, and the animation that plays for detonation. You can destroy the block during the detonation via Self-Switch into a blank event(for the boulder itself), and with proper timing (and a Wait if necessary) it should be erased in the middle of the explosion.
You may also wish to set a factor wherein the object must also be there for a bomb to be placed.
It's trickier if you want to be able to use bombs anywhere, but this is a convenient way to associate bomb-breaking with your breakable objects.