Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
354
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:

Latest Threads

Latest Posts

Latest Profile Posts

Just a reminder. One expectation of being a new member is that you read the rules. You can find them here: https://forums.rpgmakerweb.com/index.php?threads/forum-rules.90/

Looking to identify this particular Keygen song used in a YTP
I'm currently in the mood to write horror.
Someone do something scary. (orange)
I have an idea, I am making low polygon 3D resources for a package in itch. but it occurred to me that I could export these as images and make MV / MZ compatible tilesets. What do you think of this?
I hate seeing threads where less-experienced user's ask for an opinion of their project, and the thread is full of negative feedback by others who are clearly not the target audience. I feel bad for the OP, and I hope they understand that no game can appeal to everyone. :frown:

Forum statistics

Threads
109,091
Messages
1,041,941
Members
141,577
Latest member
dreaptix
Top