I will change the portraits of the champions if items are changed in a slot.
If no item is equipped, then the "aurelius.tga" portrait shall spawn. But it doesn´t.
"marine_helmet.tga" and "marine_helmet_2.tga" portraits are working. But if I pick up the item and have it as cursor
nothing happens. I have no idea, how I can tell LoG that the "aurelius.tga" picture have to be shown if the slot is empty.
Can someone help me please with this little issue?
Here is the script I use for the onUnequipItem hook:
Code: Select all
onUnequipItem = function(self, itemSlot)
local itemSlot = 1
local currItem
if self:getItem(itemSlot) ~= nil then
currItem = self:getItem(itemSlot)
if self:getName() == "Captain Aurelius" then
if currItem.name == "marine_helmet" then
self:setPortrait("mod_assets/textures/portraits/marine_helmet.tga")
else
if currItem.name == "marine_helmet2" then
self:setPortrait("mod_assets/textures/portraits/marine_helmet_2.tga")
else
self:setPortrait("mod_assets/textures/portraits/aurelius.tga")
end
end
end
end
end,