Item common event closes menu

Discussion in 'RPG Maker VX Ace' started by Topdod, Sep 11, 2019.

  1. Topdod

    Topdod Villager Member

    Messages:
    14
    Likes Received:
    0
    I have a few items that run common events as soon as you use them and the common event runs it closes the menu window. Anyway to have item common events NOT close the menu?
    Obviously this gets very annoying if you need to use multiple items in a row.
     
    #1
  2. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,455
    Likes Received:
    3,727
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Try playing around with different Scopes for your item - that MIGHT solve it.
     
    #2
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,643
    Likes Received:
    6,584
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    common events need a game-interpreter to run, and by default interpreters only exist on the map and on the battlescreen.
    That is why every item with common events closes the menu before processing the common event - it can't be processed outside the map.

    There are only two ways around that - you either need to be able to make the item without a common event (not easy for a lot of effects that require eventing) or you need to add a interpreter to the item screen.
    For the second option, tsukihime has written a script that adds menu interpreters, but there is no guarantee that it works with your other scripts. You should try it, because there is no other option available (adding an interpreter to the menu screens isn't easy and I know of no other script that does this).
     
    #3
    Topdod likes this.
  4. Halno

    Halno Villager Member

    Messages:
    22
    Likes Received:
    2
    Location:
    Brazil
    First Language:
    Pt/Eng
    Primarily Uses:
    RMVXA
    It would be a bit easier if you could describe what you're trying to do more precisely so we could help you further.

    What you're trying to do - have the events just simply not close the menu after they're used - is impossible without scripts. HOWEVER, you can just add a menu call to the end of your event! Its located in the third page, first box of your event commands:

    [​IMG]

    This CAN be quite problematic though, if your event is called outside of a menu. in which case you can just put the menu call inside a conditional with a switch, and have it open the menu by default, and when the switch is turned on, have it not call the menu.

    Hope I could be of help!
     
    #4
  5. Topdod

    Topdod Villager Member

    Messages:
    14
    Likes Received:
    0
    I'm not doing anything too fancy.
    The items all add a status effect to a character. The common event then checks if a character has it and if met it will change variables depending on who has the status effect. The idea is a variable will countdown and once it hits zero something happens to that character.

    EDIT:
    Worked like a charm!
    Thank you.
     
    Last edited: Sep 11, 2019
    #5
  6. Halno

    Halno Villager Member

    Messages:
    22
    Likes Received:
    2
    Location:
    Brazil
    First Language:
    Pt/Eng
    Primarily Uses:
    RMVXA
    Then it will be used only in the menu? That simplifies things a bit, you can just add a menu call straight to the end of your common event as needed, and it will bring the menu screen right back up. i think you need a script or script call to open specific menu screens (like go straight to your inventory)
    Is it a item that can be used in battle though? if it is used in battle the same applies as i said in my previous reply - you will need to make a conditional that checks if you're in battle or not, to do that, just make a Conditional with Script as a parameter and put this in there:
    Code:
    $game_party.in_battle
    This will return a true value if the party is in battle, so you want to put the menu call in the "Else" branch if you don't want it to bother you during a battle.

    Hope I could be of help!
     
    #6

Share This Page