generally if equip table:
<aside> 💡
ie. empty: table unequips the all or with one defined unequip the rest
</aside>
<aside> 💡
equipping needs the item in inventory
</aside>
for testing local, onactive enginehandler:
local self = require('openmw.self')
local types = require('openmw.types')
local function onActive()
-- do stuff here
end
return { engineHandlers = { onActive = onActive } }
local equips = types.Actor.getEquipment(self)types.Actor.setEquipment(self,equips)
where equips is a table, map for splot and item values
this one as iterator
for splot,item in pairs(equips) do
print(self.recordId, splot, item.recordId)
end
this means global world, createobject and moveinto or such to get the item
types.Actor.setEquipment(self, {
[types.Actor.EQUIPMENT_SLOT.Boots] = "boots of blinding speed[unique]" } )
equips[ ] part emulating above