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,311
Reaction score
6,072
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

Government : "Hehehe~ I will spread lies that the earth is round so that I could sell globes~"
Anyone here managed to never burn out on programming? My current limit is 3 months(6-8 hours per day, 7 days per week, 50 hour programming week on average), and then I just have to take a break, sometimes lasting few days(with at most 2 hours on programming per day). I've been always like this so far, so I admire those who can always be so passionate on programming :)

Forum statistics

Threads
99,655
Messages
967,746
Members
131,338
Latest member
Vattitheminish
Top