QuickShot010 Posted January 14, 2015 Share Posted January 14, 2015 Ok, so i have this problem with my custom character, he changes art prefabs when you reach certain days but this bugs the ghost... i used this code for the hair growthinst:AddComponent("beard")inst.components.beard.onreset = function() inst.AnimState:SetBuild("drok")end inst.components.beard.prize = "beardhair"local beard_days = {1,2,3,4,5}local beard_bits = {3,5,8,10,14} inst.components.beard:AddCallback(beard_days[1], function() inst.components.beard.bits = beard_bits[1] inst.AnimState:SetBuild("drokquarter")end) inst.components.beard:AddCallback(beard_days[2], function() inst.components.beard.bits = beard_bits[2] inst.AnimState:SetBuild("drokhalf")end) inst.components.beard:AddCallback(beard_days[3], function() inst.components.beard.bits = beard_bits[3] inst.AnimState:SetBuild("drokfull")end) inst.components.beard:AddCallback(beard_days[4], function() inst.components.beard.bits = beard_bits[4] inst.AnimState:SetBuild("drokfullstubble")end) inst.components.beard:AddCallback(beard_days[5], function() inst.components.beard.bits = beard_bits[5] inst.AnimState:SetBuild("drokfullbeard")end)I know that his bugs the ghost, but im not sure on how to fix it. Any ideas on how to fix it? Link to comment https://forums.kleientertainment.com/forums/topic/49113-custom-character-ghost-problem/ Share on other sites More sharing options...
DarkXero Posted January 14, 2015 Share Posted January 14, 2015 That code looks identic to Wilson's beard.Are you sure the problem is there? Link to comment https://forums.kleientertainment.com/forums/topic/49113-custom-character-ghost-problem/#findComment-601848 Share on other sites More sharing options...
QuickShot010 Posted January 14, 2015 Author Share Posted January 14, 2015 That code looks identic to Wilson's beard.Are you sure the problem is there?Yes, When i started creating Drok for DST i finnished the first build, and ghost. Both seemed to be working so i pushed the other builds and added the beard script. I think it has something to do with the fact that he changes builds? Thanks for your help. Link to comment https://forums.kleientertainment.com/forums/topic/49113-custom-character-ghost-problem/#findComment-601875 Share on other sites More sharing options...
DarkXero Posted January 14, 2015 Share Posted January 14, 2015 Ah, yes, it's not identical, you are right: Wilson gets symbol overrides and these are build changes. Well, if you think the problem is ghost related, then you can enclose things in:if not inst:HasTag("playerghost") then --function codeendLike:inst.components.beard.onreset = function() if not inst:HasTag("playerghost") then inst.AnimState:SetBuild("drok") endendinst.components.beard:AddCallback(beard_days[1], function() if not inst:HasTag("playerghost") then inst.components.beard.bits = beard_bits[1] inst.AnimState:SetBuild("drokquarter") endend) Link to comment https://forums.kleientertainment.com/forums/topic/49113-custom-character-ghost-problem/#findComment-602016 Share on other sites More sharing options...
QuickShot010 Posted January 15, 2015 Author Share Posted January 15, 2015 (edited) Ah, yes, it's not identical, you are right: Wilson gets symbol overrides and these are build changes. Well, if you think the problem is ghost related, then you can enclose things in:if not inst:HasTag("playerghost") then --function codeendLike:inst.components.beard.onreset = function() if not inst:HasTag("playerghost") then inst.AnimState:SetBuild("drok") endendinst.components.beard:AddCallback(beard_days[1], function() if not inst:HasTag("playerghost") then inst.components.beard.bits = beard_bits[1] inst.AnimState:SetBuild("drokquarter") endend) hmm still doesn't seem to be working... any ideas? EDIT: It's a good idea to enable the mod you are working on instead of an outdated version Thanks for your help, it works Edited January 15, 2015 by QuickShot010 Link to comment https://forums.kleientertainment.com/forums/topic/49113-custom-character-ghost-problem/#findComment-602215 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