Jump to content

Recommended Posts

Also - your images are not the proper dimensions.

They must have a power of 2 instead of 120 x 104 your image should be 128 x 128

instead of 188 x 288 try 128 x 256

and instead of 3200 x 1600 maybe 4096 x 2048 (or 2048 x 1024)

 

I want to note that this /\ is not always necessary. Some people get black squares from improper dimensions. So if there aren't any problems/dead ends, ignore it for now.

Link to comment
Share on other sites

Also - your images are not the proper dimensions.

They must have a power of 2 instead of 120 x 104 your image should be 128 x 128

instead of 188 x 288 try 128 x 256

and instead of 3200 x 1600 maybe 4096 x 2048 (or 2048 x 1024)

 

 

finally make my weapon can be debug spawn.but still invicible and cannot attack yet

something bothers me why my weapon zips appear two atlas?

atlas-0.tex

atlas-1.tex

 

it appears by its own

Link to comment
Share on other sites

I want to note that this /\ is not always necessary. Some people get black squares from improper dimensions. So if there aren't any problems/dead ends, ignore it for now.

 

I was unaware that it wasn't always a problem, it drove me batty trying to figure out why my images weren't showing up properly.

 

Link to comment
Share on other sites

I was unaware that it wasn't always a problem, it drove me batty trying to figure out why my images weren't showing up properly.

 

local assets=
{
    Asset("ANIM", "anim/scissor_ground.zip"),
    Asset("ANIM", "anim/swap_scissor.zip"),
 
    Asset("ATLAS", "images/inventoryimages/scissor.xml"),
    Asset("IMAGE", "images/inventoryimages/scissor.tex"),
Asset( "IMAGE", "minimap/scissor.tex" ),
Asset( "ATLAS", "minimap/scissor.xml" ),
}
prefabs = {
}
local function fn()
 
    local function OnEquip(inst, owner)
        owner.AnimState:OverrideSymbol("swap_object", "swap_scissor", "swap_scissor")
        owner.AnimState:Show("ARM_carry")
        owner.AnimState:Hide("ARM_normal")
    end
 
    local function OnUnequip(inst, owner)
        owner.AnimState:Hide("ARM_carry")
        owner.AnimState:Show("ARM_normal")
    end
 
    local inst = CreateEntity()
    local trans = inst.entity:AddTransform()
    local anim = inst.entity:AddAnimState()
    local sound = inst.entity:AddSoundEmitter()
    MakeInventoryPhysics(inst)
 
inst:AddTag("irreplaceable")
    local minimap = inst.entity:AddMiniMapEntity()
    minimap:SetIcon( "scissor.png" )
     
    anim:SetBank("scissor")
    anim:SetBuild("scissor")
    anim:PlayAnimation("idle")
 
    inst:AddComponent("inspectable")
     
    inst:AddComponent("inventoryitem")
    inst.components.inventoryitem.imagename = "scissor"
    inst.components.inventoryitem.atlasname = "images/inventoryimages/scissor.xml"
     
    inst:AddComponent("equippable")
    inst.components.equippable:SetOnEquip( OnEquip )
    inst.components.equippable:SetOnUnequip( OnUnequip )
 
inst:AddComponent("characterspecific")
    inst.components.characterspecific:SetOwner("rvn")
 
    return inst
end

return  Prefab("common/inventory/scissor", fn, assets, prefabs)

i manage to get the weapon(scissor) appear in my inventory but it invisible on ground or holding.

i checked the anime zip files but is nothing wrong . i don't know what missed?

Link to comment
Share on other sites

local assets=
{
    Asset("ANIM", "anim/scissor_ground.zip"),
    Asset("ANIM", "anim/swap_scissor.zip"),
 
    Asset("ATLAS", "images/inventoryimages/scissor.xml"),
    Asset("IMAGE", "images/inventoryimages/scissor.tex"),
Asset( "IMAGE", "minimap/scissor.tex" ),
Asset( "ATLAS", "minimap/scissor.xml" ),
}
prefabs = {
}
local function fn()
 
    local function OnEquip(inst, owner)
        owner.AnimState:OverrideSymbol("swap_object", "swap_scissor", "swap_scissor")
        owner.AnimState:Show("ARM_carry")
        owner.AnimState:Hide("ARM_normal")
    end
 
    local function OnUnequip(inst, owner)
        owner.AnimState:Hide("ARM_carry")
        owner.AnimState:Show("ARM_normal")
    end
 
    local inst = CreateEntity()
    local trans = inst.entity:AddTransform()
    local anim = inst.entity:AddAnimState()
    local sound = inst.entity:AddSoundEmitter()
    MakeInventoryPhysics(inst)
 
inst:AddTag("irreplaceable")
    local minimap = inst.entity:AddMiniMapEntity()
    minimap:SetIcon( "scissor.png" )
     
    anim:SetBank("scissor")
    anim:SetBuild("scissor")
    anim:PlayAnimation("idle")
 
    inst:AddComponent("inspectable")
     
    inst:AddComponent("inventoryitem")
    inst.components.inventoryitem.imagename = "scissor"
    inst.components.inventoryitem.atlasname = "images/inventoryimages/scissor.xml"
     
    inst:AddComponent("equippable")
    inst.components.equippable:SetOnEquip( OnEquip )
    inst.components.equippable:SetOnUnequip( OnUnequip )
 
inst:AddComponent("characterspecific")
    inst.components.characterspecific:SetOwner("rvn")
 
    return inst
end

return  Prefab("common/inventory/scissor", fn, assets, prefabs)

i manage to get the weapon(scissor) appear in my inventory but it invisible on ground or holding.

i checked the anime zip files but is nothing wrong . i don't know what missed?

 

well, its the animation I know that. But without looking at the scml and/or the mod, I couldn't say for certain.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...