• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About ShimakazeKai

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Im new to modding and i went a little bit too ambitious with my first mod and now im having troubles fixing bugs. most of them only happen on the client side, and works fine on the host's side. I have been working on a backpack that has a level system, the stats are working properly, however i wanted the item's name to be updated too when it is upgraded. The updated name only shows on the host's screen and the client just sees the default name. Another problem im having is that I wanted it to be upgraded when a specific item is inserted into the inventory and the bag is then closed for the upgrade to trigger. (the item is consumed). This works as intended on the host, but the client must drop the backpack for this to happen. Im thinking maybe there is a different event it can listen to to trigger the checking and upgrading functions? local function CheckForUpgrade(inst) local container = inst.components.container for i = 1, container:GetNumSlots() do local item = container:GetItemInSlot(i) or nil if item ~= nil and item.prefab == "screw" and inst.level < 5 then inst.level = inst.level+1 container:RemoveItemBySlot(i) applyupgrades(inst) end end end function applyupgrades(inst) = "Daihatsu +"..inst.level inst.components.equippable.walkspeedmult = 0.8+ inst.level * 0.02 + inst.penalty inst.components.armor.absorb_percent = 0.3 + inst.level * 0.04 end These are the functions im using to do the job, CheckForUpgrade triggered by ListenForEvent("onclose") Any help is appreciated, thanks.