• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to display outfit on inventory window?

poncex

New Member
Joined
Nov 11, 2012
Messages
41
Reaction score
4
Hi all, I would like to know if you can help me to do this in my otc, both place the box in the inventory and place the outfit, please if you could help me since I am just starting to use otc and I do not understand much
 

Attachments

Declare outfitCreatureBox = nil
Hook it to an element inside init() function: outfitCreatureBox = inventoryWindow:getChildById('outfitCreatureBox')
Add this onOutfitChange = onOutfitChange, under onInventoryChange = onInventoryChange, in both functions init() and terminate().
Next add this onOutfitChange(player, player:getOutfit()) under toggleAdventurerStyle(player and Bit.hasBit(player:getBlessings(), Blessings.Adventurer) or false).
Next paste anywhere:
Lua:
function onOutfitChange(player, outfit)
    outfitCreatureBox:setOutfit(outfit)
end
Next inside otui:
Code:
  Creature
    id: outfitCreatureBox
    anchors.top: parent.top
    anchors.left: parent.left
    padding: 4 4 4 4
    fixed-creature-size: true
Play with anchors.
 
Last edited:
Back
Top