ItemHandlers::UseInField.add(:ITEM1,proc{|item|
Kernel.pbMessage(_INTL("{1} used the {2}!",$Trainer.name,PBItems.getName(item)))
$game_switches[32] = !$game_switches[32]
})
Ah, thanks! But how do I make it so it's indicative of whether or not that switch is on?
Ex: "Player turned ITEM1 on!" and "Player turned ITEM1 off!"
ItemHandlers::UseInField.add(:ITEM1,proc{|item|
state = ($game_switches[32]) ? "off" : "on"
Kernel.pbMessage(_INTL("{1} turned {2} {3}!",$Trainer.name,PBItems.getName(item),state))
$game_switches[32] = !$game_switches[32]
})
Also, how do I make it so it's a key item that shows the "use" option? I already defined it as "useable outside of battle" in items.txt and yet, for some reason, it has "deselect" instead of "use" in the command prompts...
ItemHandlers::UseFromBag.add(:ITEM1,proc{|item|
state = ($game_switches[32]) ? "off" : "on"
Kernel.pbMessage(_INTL("{1} turned {2} {3}!",$Trainer.name,PBItems.getName(item),state))
$game_switches[32] = !$game_switches[32]
})
ItemHandlers::UseFromBag.add(:ITEM1,proc{|item| next [COLOR=Red]2[/COLOR]})
So, do I use both of the codes you gave? Or do I have to merge them into one somehow? I'm not quite sure how I should integrate them into PokemonItemEffects.