Equipping the dual wield slot

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
I'm unable to figure out how to equip something to a character's 2nd weapon slot via eventing or script calls. If you use the event command to equip a weapon twice, it will just keep swapping out the first weapon and never equip the second one. You can't select a weapon to equip in the shield slot, and when I tried something like $game_actors[x].equip[1]=17, trying to equip item 17 in the 1 slot (which should be the shield/off hand slot), it doesn't work. It seems that the issue is that the engine basically gives a character two 0 slots, but no way to actually differentiate which is which.


Basically, what I'm trying to do is unequip a character of both weapons who has the dual wield trait (which I haven't been able to do, I can only unequip the main weapon - in fact, if I try to unequip a shield, it removes their dual wield flag and gives them a shield slot), then re-equip them with two weapons. I don't want to get any scripts if I can help it, or at least none of the larger ones that change any functionality. I don't want my dual wield character to be able to equip shields or anything in their off hand slot, I want them to just have the two weapon slots. I'm not looking to add 2-hander functionality to the game. I'm not looking to modify the existing structure of the system if I can help it - but I can't figure out how in the world to force-equip or force-remove something in the second weapon slot for any character with the dual wield flag.


EDIT: Just figured it out. Was browsing through the game_actor section of Game Objects for the change equip commands and came across change_equip_by_id(slot_id, item_id). If I do a script call like,

Code:
$game_actors[x].change_equip_by_id(1, 15)
	$game_actors[x].change_equip_by_id(0, 16)
then it will properly equip weapons to both weapon slots. I can also de-equip those slots by using 0 for the item_id.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top