How to lay bombs - Bomberman system

● ARCHIVED · READ-ONLY
Started by Kay007 3 posts View original ↗
  1. Hello all!

    My goal is to integrate a Bomberman-like system into the game. By pressing a key, you lay down a bomb, which will stay in position for a few seconds, explode and then reset. I've been trying to get this working for hours now, tried different approaches from forum posts but it does not work as intended for the moment. I didn't find any bomberman programs for VX Ace, from which I could learn anything, only Youtube videos showing, that it is possible (at least for RPG Maker 2000).

    My idea is (derivated from the tips I have from different forum posts) to have a common event running, which is on parallel process and constantly checks for the players position on the map and if the "lay bomb" key is pressed.

    The common event then turns on the switch for the bomb-event which is positioned on the map and puts said event on the players coordinates.

    (Program language still german - Steam wouldn't let me switch language as easy as I thought).

    Global setting with "activate by touch" event close to the player, so that the common event will start and the two bombs at the edge.

    maps.jpg

    Common event page.

    common event.jpg

    Bomb-event. First page is clean as it only waits for activation by the common event.

    Eventpage.jpg

    As for now, when I press the button, both bombs are laid at the same time, with a second hit of the button, the first bomb will be refreshed on spot and the second one will be placed at the players position. Both bombs explode and reset at the same time.

    I guess the problem isn't complicated to solve, but my brain turned into a big flubber in the past few hours. Thank you all in advance for your help and patience. :)
  2. If two bombs are being laid at the same time, and the position of the bomb is constantly getting refereshed upon touching, then you probably haven't told the program not to lay a bomb when a certain number is already present. Just trying to get you in the right mindset for solving issues like this.

    To make sure the position of the bomb doesn't refresh itself when it's already placed, I'd use a new switch and conditional branches. This switch would make sure that the player can't place that same bomb while that switch is ON. When the bomb explodes, that restrictive switch is turned OFF, and the player can press the button again to place another.

    If you want the player to be able to place multiple bombs at the same time, as with the real Bomberman games when you get a power-up, you might need to use some variables. One variable could be used to check how many "bomb" events are on the screen, and another could control the "cap" of how many bombs the player can place, which raises every time the player gets a power-up.

    I'm not sure if this will work for you, since I haven't tested this out myself, but it should give you a start.

    EDIT: Another suggestion: How are you managing your input events? RPG Maker's default input system is notoriously over-sensitive. A button-press could register itself way more than one time unless you put in a "wait" command to add a bit of a delay.
  3. Hey Ratty,

    back at it again after my brain regained some sense. :)

    Made everything from scratch again and tried what seemed logical to me. First of all, I threw the "Get location info" thing out of the common event, as I don't even know, what it does. Just copied it from another event, which seemed to have a similar effect.

    Now I just use switches to turn Bomb 1 and 2 on. It seemes to work fine, except for the fact, that both bombs are laid at the same time. I have made conditional branches, which should avoid, that bomb 2 is laid, when bomb 1 is not in the field. I guess the parallel process of the common event runs multiple times while I press the spacebar.

    Is there a way to limit the button input to one per press, so that a button held down will still give only a one-time-input?

    Even if that is not the issue, I guess knowing how to limit the button-input could be nice. :)

    Update:

    I managed to get the system working. At least partly.

    The beginning of the common event looks like this now:

    @>Loop

         @>Wait 1 frame(s)

         @>Conditional Branch: The C Button is Being Pressed

               @>Break Loop

               @>

          :     Branch End

         @>

    :     Repeat Above

    common event.jpg

    After that comes the check for the players location and the conditional branches, to check which bomb already lays on the field.

    This works fine for the first time I lay the bombs. One button press gives me one bomb on the field. If I keep one bomb on the field at all times (lay the second one, when the first one is half through its timer and so on), the system works.

    However, if I lay both bombs, let them explode and after that try to lay them again, both appear at the same time again with only one button press.

    I'm a bit at a loss again. But hey, I made a bit of progress. :)