Group: Member
Posts: 5
Type: Writer
RM Skill: Undisclosed
I have a question about Weapon and Armor. Is there a way to activate a Common Event when the player equips or uses weapons or armor? 'Cause I want the game to know or the player is wearing light or heavy armor, and I want a Bow & Arrow system in which the player loses 1 arrow when he attacks.
Group: Local Mod
Posts: 1,250
Type: Event Designer
RM Skill: Masterful
Rev Points: 90
I am taking a look into this for you, it's a rather tricky problem, as there is not way that I've found to check when the player uses the 'attack' command vs anything else in battle with events. This may require scripting, but I will still look into a solution for you, until someone presents a script solution.
As far as the armor check goes, you can do that, but you will need to make a conditional branch for each potential armor the character can wear. On page two you can set that check. There is no way to set it on the armor itself. I'll keep looking for a cleaner and simpler solution, but this is probably another one where a script would be the simplest solution. You may go to script requests and post your request there as well.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # Run Common Event When Equipping an Item # Version: 1.0 # Author: DiamondandPlatinum3 # Date: September 25, 2012 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Description: # # This script allows you to run a common event when you equip an item, be # it a weapon or a piece of armour. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #------------------------------------------------------------------------------ # Instructions: # # ~ In your weapon and armour noteboxes, insert this line of code # # ~E_COMMONEVENT_ID: ? # # Replacing the ? with a number to represent which common event you # want to run when that specific item is equipped. # # # ~ You do not have to place this code on every weapon and armour you # have, just the ones you wish to use a common event on. # # # ~ There is a visual example that can be found # Here: http://img4host.net/upload/242103145060ae72be40a.png # #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # # THERE IS NO EDITABLE REGION TO THIS SCRIPT # #==============================================================================
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Change Equipment (designate object) # equip_type : Equip region (0..4) # item : Weapon or armor (nil is used to unequip) # test : Test flag (for battle test or temporary equipment) #-------------------------------------------------------------------------- alias dp3_equipcommonevent_9jsg4 change_equip def change_equip(equip_type, item, test = false)
# Call Original Method dp3_equipcommonevent_9jsg4(equip_type, item, test)
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # Run Common Event When Equipping an Item # Version: 1.0 # Author: DiamondandPlatinum3 # Date: September 25, 2012 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Description: # # This script allows you to run a common event when you equip an item, be # it a weapon or a piece of armour. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #------------------------------------------------------------------------------ # Instructions: # # ~ In your weapon and armour noteboxes, insert this line of code # # ~E_COMMONEVENT_ID: ? # # Replacing the ? with a number to represent which common event you # want to run when that specific item is equipped. # # # ~ You do not have to place this code on every weapon and armour you # have, just the ones you wish to use a common event on. # # # ~ There is a visual example that can be found # Here: http://img4host.net/upload/242103145060ae72be40a.png # #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # # THERE IS NO EDITABLE REGION TO THIS SCRIPT # #==============================================================================
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Change Equipment (designate object) # equip_type : Equip region (0..4) # item : Weapon or armor (nil is used to unequip) # test : Test flag (for battle test or temporary equipment) #-------------------------------------------------------------------------- alias dp3_equipcommonevent_9jsg4 change_equip def change_equip(equip_type, item, test = false)
# Call Original Method dp3_equipcommonevent_9jsg4(equip_type, item, test)