Hi,
i want a charackter to automaticaly unequip his weapon during one fight
i found the event option to unequip, but i need a elegant way to save whitch weapon exactly was equiped that the charackter automaticaly can pick this one up again after the fight
Is there a way to dothis with events or do i have to script it?
Automatic Weapon equip/unequip
● ARCHIVED · READ-ONLY
-
-
This is an english forum, please post your questions in english.
You can't do this by eventing alone, you need to use script calls for storing which weapon ID was equipped and for re-equipping it after the fistfight. The event command change equipment is too limited for that as it requires a fixed item to be equipped. -
ah dang sry *selffacepalm*
i shouldn't write forumposts at 4 am xD (i just didn't realized in which language i wrote that xD)
(fixing this right now) -
Yeah Andar's right, you need to do it with script. Here's a fast way how to done that.
Here's the logic :
1. Before battle processing, you need to set the weapon of ID of the actor to a variables.
2. after that change equip, i.e Eric, to = none (This will make Eric do battle without Hand Ax)
3. After Battle you need to force Eric to equip the Hand Ax again (but this cia script call).
So how to do that? Let's help you do this :
1. Get the weapon ID and store it in variable
- First add control variables and name it Weapon ID, then choose set.
- After that go to the script box( at the bottom ) and paste this $game_actors[ID].weapons[0].id # ID = Actor ID in database.
- Let's choose Eric(ID be default is 1) so change it to $game_actors[1].weapons[0].id
2. Disarm Eric
- Add command event : Change Equipment, choose Eric, and change the weapon to none
3. Do Battle
- Battle Processing
4. After Battle Make Eric Equip His Weapon Again
- Script call, paste this
$game_actors[1].change_equip_by_id(0, $game_variables[1])This will do what you want, just change the ID for different actor. This only for 1 wielding actor, for dual wield it's a bit different(actually the logic is same, but you know it need more things to do).
You can test it by removing the Battle Processing, and separate the steps into 2 event.
Event 1 is for Step 1 and 2
Event 2 is for Step 4
After talk to Event 1, look at Eric inventory, the Hand Ax will removed, then talk to Event 2, Eric will automatically equip the Hand Ax(or any weapon he use before he disarmed).
I hope I do it right, =) -
thank you very much for the detailed explanation ^^