Item useable both in menu and battle, but common event runs only in menu.

AkisaNemo

Overcaffeinated Artist
Member
Joined
Jan 28, 2017
Messages
14
Reaction score
2
First Language
Malaysia, ENG
Primarily Uses
RMVXA
I added a consumable item that can be used in both menu and battle. I made a common event that would run if the player uses it in the menu, but the common event also run during a battle.

melon menu.PNG
melon battle.PNG

I only want the common event to run in the menu and not during battle. Is there anyway I can do this? If a variable is needed to do this, I would like an explanation of it. (I'm not good with variables)
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,288
Reaction score
6,042
First Language
Indonesian
Primarily Uses
RMVXA
In your common event, put a conditional branch, set it to script, and write either
Code:
!$game_party.in_battle
or
Code:
!SceneManager.scene_is?(Scene_Battle)
Put all the events you want to run outside the battle inside the conditional branch.
 
  • Like
Reactions: BCj

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

Latest Threads

Latest Posts

Latest Profile Posts

Yo Ho Ho... Time flies when you are having rum...

I'm rewatching Glee, just watched grilled cheesus.
Now I'm not sure if I'm hungry or I want to cry.
I just completed Ara Fell - completing the game unlocks an Epilogue. An interesting thing to possibly consider for my games.
I decided to try to make a mucha-styled artwork, and by now I've sunk more time in studies and sketches than I usually do in the whole thing. Fingers crossed it's worth it!
Since we have a lot of new faces, please be sure to read the forum rules under the Help tab at the top. Thanks!

Forum statistics

Threads
99,451
Messages
965,430
Members
131,066
Latest member
sajumfd
Top