EverSoNitro Posted September 13, 2017 Share Posted September 13, 2017 I'm trying to make a custom weapon for my character (well, two of them, actually), but I'm running into some issues with getting them to appear. I followed this tutorial But after doing so, the items in question don't show up in my character's hand, nor in my inventory. However, they do appear on the ground, as well as in the crafting tab. Attached is the full mod, I've gone over the files but I can't seem to figure out the issue. Whoopee.rar Link to comment Share on other sites More sharing options...
Lumina Posted September 13, 2017 Share Posted September 13, 2017 (edited) Try add this in the prefab for the inventory image part : inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "myprefab" inst.components.inventoryitem.atlasname = "images/inventoryimages/myprefab.xml" Usually the imagename and atlasname share the same name, but obviously if for one reason or another you have multiples images in one atlas, rename the image accordingly. (You should already had the first line) Edited September 13, 2017 by Lumina Link to comment Share on other sites More sharing options...
Lumina Posted September 13, 2017 Share Posted September 13, 2017 Also, i think your folder aren't ok. You should have Folder "swap_whatevermyprefabis" Containing : "swap_whatevermyprefabis.scml" project another folder "swap_whatevermyprefabis" And in this another folder "swap_whatevermyprefabis" "swap_whatevermyprefabis.png" image As far as i understand this is this structure that allows the swap image to be understood as a symbol by the game. Hope it's clear. I know that it's hard to understand because the tutoriel is old and old posts on forum have the code balise messed up so they are harder to read. Link to comment Share on other sites More sharing options...
EverSoNitro Posted September 13, 2017 Author Share Posted September 13, 2017 That sorted it out, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now