How to temporarily disable items

● ARCHIVED · READ-ONLY
Started by Lunawolfcomics 6 posts View original ↗
  1. Hey everyone, so in my project there is a battle where you cannot use items (in order to increase difficulty). How can I do this? I want it so that items will be disabled until after the battle, or all items will get saved and deleted before the battle, and then restored after the battle. Thanks, let me know :)

    -JAD
  2. #===============================================================================#                      http://dekitarpg.wordpress.com/                         #===============================================================================module BatItem#===============================================================================  #-----------------------------------------------------------------------------  # Switch_ID  #-----------------------------------------------------------------------------  Switch_ID = 50  #-----------------------------------------------------------------------------  # Array Of Items That Cannot Be Used When Switch_ID is ON !!  #-----------------------------------------------------------------------------  Items     = [1,2,3,4,5]end#===============================================================================#                      http://dekitarpg.wordpress.com/                         #===============================================================================class Window_BattleItem < Window_ItemList#===============================================================================  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------  alias :include_battle_item? :include?  #-----------------------------------------------------------------------------  #  #-----------------------------------------------------------------------------  def include?(item)    if $game_switches[BatItem::Switch_ID]      include_battle_item?(item) && !BatItem::Items.include?(item.id)    else      include_battle_item?(item)    end  endend#===============================================================================#                      http://dekitarpg.wordpress.com/                         #===============================================================================Pop thatinto your script editor and turn on switch ID before the battle and off after the battle. Easy ^_^
  3. Hey thanks a lot Dekita! I was looking through your site to see the pricing for this script, because I plan on making my project a commercial project. How much is this script?
  4. For that? dont be silly. It literally took me about 1 minute to write after reading your post :p

    I have written scripts that do VERY similar things - like my achievement script which restricts item usage until certain criteria has been met for example. This was essentially a snippet of code from that - even though I wrote it. :D

    Of course, if you wanted to donate something for the lolz, I wont say no ^_^
  5. Haha you got Dekita and thanks again it's much appreciated!

    I was looking at a lot of your other scripts and trust me I'll be using some of them for sure!

    Well for this script at least let me credit you!
  6. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.