Jump to content

EquipItemEx: how to equip duplicate items to both hands?


irswat

Recommended Posts

Suppose I want to equip a dragon sting dagger, one to the left hand, and the other to the right hand. The player has 2 of the same items in their inventory. Can I simple issue two consecutive EquipItemEx, one to left hand, one to right?

 

 

					form FormThatMatches=ExEquipItem(Formulator, ItemNameLength)
					
					if PlayerREF.GetItemCount(FormThatMatches)
					
						;UnequipCurrentWeapon()
						;GetWeaponType
						;this will search for a equipment slot immediately after command content
						;left, right, or both
						;if no equipment slot is found.
						;weapon will be equipped to empty hand.
						;then right hand, then left hand.
						;dual weilding two handed weapons compatibility
						;will attempt to equiq two handed weapons to empty hand, right, then left
						
						int HandToEquip=GetEquipSlot(CMDParserCounter)
						
						if HandToEquip==1 || HandToEquip==0
							PlayerRef.EquipItemEx(FormThatMatches,HandToEquip,false,true)
						elseif HandToEquip == 3
							if PlayerREF.GetItemCount(FormThatMatches)>1
								PlayerRef.EquipItemEx(FormThatMatches,0,false,true)
								PlayerRef.EquipItemEx(FormThatMatches,1,false,true)
							endif
						elseif HandToEquip == -1 
							;EXCEPTION ERROR
						elseif HandToEquip == -99 
							;no equipment slot command detected
						endif
					endif 

 



or is there some sort of trick I need to do using object references to differentiate the two identical dragonsting daggers?

EDIT: This method does work!

Edited by irswat
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...