Zardexrlz Posted November 13, 2016 Share Posted November 13, 2016 (edited) I'm making a port of the icemaker from shipwreckt to DST and it's all done, but for some reason when I hammer the machine it becomes invisible when the hammer hits. Also where should I use the code below in my code? I kinda get what it does, but kinda not, so if anyone can explain, I would be grateful inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end The prefab lua file is at the end of this post. Thanks in advance for the replies :3 icemaker.lua Edited November 13, 2016 by Zardexrlz Link to comment https://forums.kleientertainment.com/forums/topic/71648-help-texture-glitching-when-hammering/ Share on other sites More sharing options...
Lumina Posted November 13, 2016 Share Posted November 13, 2016 Maybe the problem is with the anim local function onhit(inst, worker) inst.AnimState:PlayAnimation("hit"..inst.machinestate) inst.AnimState:PushAnimation("idle"..inst.machinestate, true) inst:RemoveEventCallback("animover", spawnice) if inst.machinestate == MACHINESTATES.ON then inst.components.fueled:StartConsuming() --resume fuel consumption incase you were interrupted from fueltaskfn end end There is a "inst.AnimState:PlayAnimation("hit"..inst.machinestate)" so it's normal that the anim change when you hammer the machine. So code wise, it seems fine. Problem is probably with the anim itself. Link to comment https://forums.kleientertainment.com/forums/topic/71648-help-texture-glitching-when-hammering/#findComment-837046 Share on other sites More sharing options...
Zardexrlz Posted November 14, 2016 Author Share Posted November 14, 2016 I see, thanks @Lumina for the reply. Since it's probably in the anim there isn't much I can do xD Link to comment https://forums.kleientertainment.com/forums/topic/71648-help-texture-glitching-when-hammering/#findComment-837254 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