Common event in battle problem...

Discussion in 'RPG Maker MV' started by tereineus, May 30, 2017.

  1. tereineus

    tereineus Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    N/A
    hi i was looking for the answer on the net and in the forum, but i can find it...
    the question is:

    how do you stop a common event from happening if the enemy misses the attack
    example:

    Goblin uses triple slash and this attack has a common event that will destroy the helmet of the hero, BUT if he misses, the event shouldn't ocurr, but that doesn't happen.

    the attack call the common event even if he misses, how do i stop that?

    i hope you can understand my pseudo english thanks!
     
    #1
  2. BrandedTales

    BrandedTales StoryTeller Veteran

    Messages:
    200
    Likes Received:
    111
    Location:
    USA - Nashville
    First Language:
    English
    Primarily Uses:
    N/A
    My game doesn't use the battle system, so I'm purely guessing from a logical concept...

    Could you run an event before the goblin's turn to record the hp each party member before the goblin's action? Then after the action, check the hp values, and if it is less, execute destroy helmet?
     
    #2
  3. Andar

    Andar Veteran Veteran

    Messages:
    27,953
    Likes Received:
    6,309
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    the common event and the skill effects are independently of each other, you need to manually add your own check.

    Easiest way is probably to add a damage formula command to turn on a switch (damage formula is executed on hit only), and check that switvch in the common event. However, you need to remember to turn off the switch or it will always execute on next skill use.
     
    #3
    tereineus likes this.
  4. Kyo Panda

    Kyo Panda Veteran Veteran

    Messages:
    34
    Likes Received:
    24
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    From Andar's answer, the formula would be something like this for the Switch with ID 1:

    Code:
    $gameSwitches.setValue(1, true); a.atk * 4 - b.def * 2
     
    #4
    tereineus likes this.
  5. tereineus

    tereineus Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    N/A
    thanks i will try that :D
     
    #5
  6. tereineus

    tereineus Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    N/A
    it worked! thanks to all!
     
    #6

Share This Page