Item common event closes menu

Topdod

Villager
Member
Joined
Jan 2, 2013
Messages
14
Reaction score
0
Primarily Uses
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.
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,134
Reaction score
4,438
First Language
English
Primarily Uses
RMVXA
Try playing around with different Scopes for your item - that MIGHT solve it.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,255
Reaction score
7,138
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).
 

Halno

Villager
Member
Joined
Jul 11, 2018
Messages
22
Reaction score
2
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:


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!
 

Topdod

Villager
Member
Joined
Jan 2, 2013
Messages
14
Reaction score
0
Primarily Uses
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:
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).
Worked like a charm!
Thank you.
 
Last edited:

Halno

Villager
Member
Joined
Jul 11, 2018
Messages
22
Reaction score
2
First Language
Pt/Eng
Primarily Uses
RMVXA
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.
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The most rewarding part of making custom body character parts is absolutely not making the masks work. Somebody please put me out of my misery.
Any commercial devs here ever mess with Gamejolt? Been contemplating making my games available there but don't know if it's worth the effort or not.
Social distancing taught me of how much of not a loner I am. Dammit, I miss seeing my friends...
Happy 4th of July all. Anybody have plans? Mine here is staying home away from the virus. Still a nice 3 day weekend.
The project I am working on is going great at the moment. I'm hoping everyone is having as successful a time as I am. :)

Forum statistics

Threads
99,258
Messages
963,580
Members
130,850
Latest member
MarcusCryo
Top