I know how to detect if any of the party members is wearing or equipping a certain armor or weapon, but I just want to ask how exactly would you unequip that weapon or armor specifically?
For example, Eric and Natalie is wearing a Bronze Cap. I want to detect if any of my members is wearing the bronze cap. Suddenly, Eric and Natalie does have the bronze cap, but I specifically want to remove Eric's cap only, leaving Natalie still equipping the bronze cap. Is this possible? if so, how?
You can use the "Change Equipment" command to equip or remove equipment from specific actors.
In Scene_Battle or Battle Processing?
The "Change Equipment" command is located in the first tab of the "Event Commands" window.
It can be done from the map or in battle.
If you are looking for the actual script call for the "Change Equipment" command, it is located in lines 1244-1246 in "Game_Interpreter" :
actor = $game_actors[@params[0]]
actor.change_equip_by_id(@params[1], @params[2]) if actor
end
So you mean i have to make an event that checks each actor of their equipment and put it inside a common event? That would be tiresome considering I have 45 characters....
If in battle, you'd either do it via troop events, or via a skill that runs a common event...
Do you need to check them all? Or only the battle members?
You could possibly set up a loop to go thru all of them.
If you want specific actors to remove their equipment, you would have to make individual checks.
Considering that you have 45 characters and that you want to remove equipment from certain characters only, what are the conditions for keeping or removing equipment?
For example, a boss event or cutscene that requires certain characters to remove certain equipments. I'm sure that you don't intend to check every single character.
Not to argue, but you did not specify that you wanted a script in your original post or any after until this final post.
You may have realized that I was mentioning event commands found in the RM editor and not scripts from the script editor from the beginning because I was not sure what it you wanted.
Yes, you did post in the scripting section, but a lot of people start threads in the wrong place many times.
Please mention that you needed a script in your original post from the beginning next time so that people like me won't end up wasting your time.
Glad someone managed to help you sort it out in the end. ^^
Well, this is kinda in the learn Ruby and RGSS3 section so I just assumed. I'm kinda embarassed because I jumped the gun and posted before I actually isolated a fully working mechanism to do what needs to be done. 🤔
At least I managed to edit it in there.
I would go with Susan's suggestion. The script call doesn't seem to make it any easier than the "Change Equipment" command unless you're going to use loops and conditional checking over a collection of actor ID's.
It would be somewhat easier to just copy and paste the line and modify a few numbers.