Jump to content

Weird shining effect


Recommended Posts

Hello,

 

I'm programming my mod on dst and I'm having a problem.

I added my prefabs with the resources and animation of the dlc Hamlet

Capture.PNG.354298d0896f651b413941fa2b0ad2d1.PNGCapture2.PNG.a18250c4bb942a83890562d1785bd138.PNG

A strange glossy effect appears, it is displayed on all entities in a radius around the custom structure.

I already looked in the build.bin and anim.build.

Capture3.thumb.PNG.7ecf187f831b0e047ea9ca4ee2732027.PNG

 

I do not know where it comes from, so if you have a clue, I'm happy to take it
Edited by Nhyarlathoteps
Link to comment
Share on other sites

require "prefabutil"
require "recipes"

local assets =
{
    Asset("ANIM", "anim/pig_townhouse1_pink_build.zip"),
    Asset("ANIM", "anim/pig_house.zip"),
}

local prefabs =
{
    "pigman",
}

local function OnLoad(inst, data)
    inst.AnimState:SetScale(0.75, 0.75, 0.75)
    inst.AnimState:PlayAnimation("anim")
    inst.AnimState:Hide("YOTP")
    inst.AnimState:Hide("SNOW")
end

local function onbuilt(inst)
    inst.AnimState:PlayAnimation("place")
    inst.AnimState:PushAnimation("anim")
end

local function fn()

    local function fn()
        local inst = CreateEntity()

        inst.entity:AddTransform()
        inst.entity:AddAnimState()
        inst.entity:AddSoundEmitter()
        inst.entity:AddMiniMapEntity()

        MakeObstaclePhysics(inst, 1)

        inst.entity:AddMiniMapEntity()
        inst.MiniMapEntity:SetIcon("pighouse.png")

        inst.AnimState:SetBank("pig_townhouse1_pink_build")
        inst.AnimState:SetBuild("pig_townhouse1_pink_build")

        inst.AnimState:SetScale(0.75, 0.75, 0.75)

        inst.AnimState:Hide("YOTP")
        inst.AnimState:Hide("SNOW")

        inst.AnimState:PlayAnimation("anim")

        inst:AddTag("structure")

        inst:ListenForEvent("onbuilt", onbuilt)

        inst.OnLoad = OnLoad
        return inst
    end

    return fn
end

return Prefab("common/test", fn(), assets, prefabs)

 

This is the prefab file

 

In the modmain.lua I'am just doing

 

PrefabFiles =
{
    "test"
}
Edited by Nhyarlathoteps
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...