[HELP] Is there a way to prevent potion use in a specific map?

Hi,

Is there a way to prevent us from using items (such as potions) during battle and in a specific map? Will be glad if someone can help me out with this thanks!

Note: I am using RMMV
To prevent item use during battle, you just change the item occasion to Only From Menu.


Preventing item use on a specific map is not so easy. There are a number of ways you could do it ...


- get a plugin written


- set up a common event and call it from the item. Check what the current map is, if it's the special map, show a message and don't use the item


- set up 2 items that are identical apart from the occasion - one will be normal, one will be "never". When you enter the special map, count how many of the "normal" item you have, remove them all, and add that many of the "never use" item. When you leave the special map, do the opposite. The player won't be able to tell the difference, apart from the fact that the item is disabled on that map
try this

make variables with map id

make common event with parallel

make conditional Branch with map you dont want item usable

  $dataItems[X].occasion = Y

 x is item id

 y is [ 0(always) or 1(battle screen) or 2(menu screen) or 3(never)]

Untitled3.jpg
try this

make variables with map id

make common event with parallel

make conditional Branch with map you dont want item usable

  $dataItems[X].occasion = Y

 x is item id

 y is [ 0(always) or 1(battle screen) or 2(menu screen) or 3(never)]
Works well! Just a little problem, how do I turn off the parallel common event? I turned off the switch which starts the parallel event but I still cannot use potions. Am I missing something?

Thanks a lot by the way  🙂
can you tell me when you want turn it off? after changing map or when something end in the story?
can you tell me when you want turn it off? after changing map or when something end in the story?
After changing map. What I am trying to do here is to prevent players from using potions in the dungeon. So after leaving the dungeon, I want the players to be able to use potions again.

In another words, I want to ban players from using potions so long as they are in the dungeon (made up of a few maps), until they complete/leave the dungeon.
i already explained it 

you make conditional Branch with maps you dont want item usable otherwise it will return normal
i already explained it 

you make conditional Branch with maps you dont want item usable otherwise it will return normal
Oh okay. Got it thanks a lot!

Original thread: https://forums.rpgmakerweb.com/threads/help-is-there-a-way-to-prevent-potion-use-in-a-specific-map.49142/