Variable Troubles

Discussion in 'RPG Maker MV' started by frustratedlad, May 10, 2018.

  1. frustratedlad

    frustratedlad Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I have a quest where the player needs to kill 10 slimes and 5 rats. So I set up two variables one for slimes and one for rats. I've seen another thread where they said you can't make it dependent on if the enemy dies, so I put in the troop tab to increase the variable by a specific number at the start of the battle. The problem is that the variables don't seem to be changing. I use a yanfly plugin to debug, so I can see that the variables aren't changing.
     
    #1
  2. DarkHyudrA

    DarkHyudrA Actually I'm Enzonaki Veteran

    Messages:
    41
    Likes Received:
    20
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    And how you did the troop eventing to change the variable?
     
    #2
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,134
    Likes Received:
    6,372
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    then show us screenshots of the troop events to check what you mighthave done wrong.
    Did you set the condition correctly? "don't run" means "never execute" as it comes from the phrase "to run a program", it has absolutely nothing to do with escaping.

    Which means that if you do it this way and correctly, the variable will increase even if the enemies are not killed.
     
    #3
  4. frustratedlad

    frustratedlad Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    oh ok, I see. I thought it just meant that the player doesn't run from the battle :/. thanks for explaining that, that makes a lot more sense
     
    #4
  5. Uzuki

    Uzuki Kawaii on the streets, Senpai in the sheets Veteran

    Messages:
    1,795
    Likes Received:
    1,243
    Location:
    Georgia
    First Language:
    English
    Primarily Uses:
    RMMV
    The way I did it for my project was like this:

    1) Use Chronosv2's Death Common Event plugin so that a certain common event runs whenever an enemy dies.

    2) Make a conditional branch that checks if the sidequest switch is on and inside that branch have the variable add one. Now when the enemy is killed, the common event will run, check if the sidequest switch is on and add to the variable.
     
    #5

Share This Page