• Content Count

  • Joined

  • Last visited

 Content Type 




Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Everything posted by BlueJelly

  1. so there is no way to get a totally random item ? My currently loot works in singelplay but on the server it crashed with this server log server_log.txtserver_log.txtserver_log.txt SGsummongoblin.lua summongoblin.lua
  2. This works fine for me local function OnDeath(inst, data) print("GOBLIN IS DEAD") if inst.goblinweapon ~= nil then inst.goblinweapon:Remove() print("No more weapon") end end but my loot isn´t working until now: local randomloot = inst.components.lootdropper:PickRandomLoot() inst.components.lootdropper:AddRandomLoot(randomloot,1) i know this can not work after i printed randomloot and saw it is nil but is there a different way to generate totally random loot ?
  3. still drops the spear local function OnDeath(inst, data) local equippedItem = inst.components.inventory:Unequip(EQUIPSLOTS.HANDS, false) if equippedItem ~= nil then equippedItem:Remove() end end could this be the Problem? local function fn() ... inst:AddComponent("inventory") inst.goblinweapon = SpawnPrefab("spear") if inst.goblinweapon ~= nil then inst.components.inventory:Equip( inst.goblinweapon ) end ... return inst end can I add a variable which i change to true in the onDeath function so he don´t equip a new spear after removing the old one ?
  4. I found Inventory:RemoveItemBySlot(slot) and Inventory:RemoveItem(item, wholestack) but i can not find information what wholestack parameter or the slot parameter takes tried this as my on death method but dosen't work local function OnDeath(inst, data) inst.components.Inventory:RemoveItem( inst.goblinweapon ) end I also tried: local function OnDeath(inst, data) inst.components.inventory:RemoveItemBySlot(EQUIPSLOTS.HANDS) end but nothing hapend
  5. Where i can find this functions is their any docu? How can i finde this function for Listing to an event or destroying an item I added local function OnDeath(inst, data) inst.components.inventory:Equip() end and this but i think i´m on a totally wrong way local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddMiniMapEntity() inst.entity:AddSoundEmitter() inst.entity:AddDynamicShadow() inst.entity:AddNetwork() ... inst.OnBuilt = linkToBuilder inst:ListenForEvent("attacked", OnAttacked) inst:ListenForEvent("onattackother", OnAttackOther) inst:ListenForEvent("death",OnDeath) return inst
  6. I found this cool mod which changed the hound attacks to goblin attacks. The goblins got a spear as a weapon. The problem I have is that the goblins drop that spear every time. Now I like to change this loot to an different item. I hope i found the right files but don´t know which line I have to change. hounded.lua summongoblin.lua