Nyogtha Posted January 13, 2015 Share Posted January 13, 2015 I have been trying to set up a transparent character, and the code doesn't seem to work. Perhaps I am putting it in the wrong place (I have been putting it under local master_postinit = function(inst) )Anyone have any advice? I would appreciate it. Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/49095-query-does-instanimstatesetmultcolour-not-work-in-dst/ Share on other sites More sharing options...
Sarcen Posted January 13, 2015 Share Posted January 13, 2015 I've used it, so, it definitely does use it. You must be doing something wrong, without your code however its impossible to tell what. Link to comment https://forums.kleientertainment.com/forums/topic/49095-query-does-instanimstatesetmultcolour-not-work-in-dst/#findComment-601630 Share on other sites More sharing options...
Nyogtha Posted January 13, 2015 Author Share Posted January 13, 2015 (edited) local MakePlayerCharacter = require "prefabs/player_common"local assets = { Asset( "ANIM", "anim/player_basic.zip" ), Asset( "ANIM", "anim/player_idles_shiver.zip" ), Asset( "ANIM", "anim/player_actions.zip" ), Asset( "ANIM", "anim/player_actions_axe.zip" ), Asset( "ANIM", "anim/player_actions_pickaxe.zip" ), Asset( "ANIM", "anim/player_actions_shovel.zip" ), Asset( "ANIM", "anim/player_actions_blowdart.zip" ), Asset( "ANIM", "anim/player_actions_eat.zip" ), Asset( "ANIM", "anim/player_actions_item.zip" ), Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ), Asset( "ANIM", "anim/player_actions_bugnet.zip" ), Asset( "ANIM", "anim/player_actions_fishing.zip" ), Asset( "ANIM", "anim/player_actions_boomerang.zip" ), Asset( "ANIM", "anim/player_bush_hat.zip" ), Asset( "ANIM", "anim/player_attacks.zip" ), Asset( "ANIM", "anim/player_idles.zip" ), Asset( "ANIM", "anim/player_rebirth.zip" ), Asset( "ANIM", "anim/player_jump.zip" ), Asset( "ANIM", "anim/player_amulet_resurrect.zip" ), Asset( "ANIM", "anim/player_teleport.zip" ), Asset( "ANIM", "anim/wilson_fx.zip" ), Asset( "ANIM", "anim/player_one_man_band.zip" ), Asset( "ANIM", "anim/shadow_hands.zip" ), Asset( "SOUND", "sound/sfx.fsb" ), Asset( "SOUND", "sound/wilson.fsb" ), Asset( "ANIM", "anim/beard.zip" ), Asset( "ANIM", "anim/druidb.zip" ), Asset( "ANIM", "anim/ghost_druidb_build.zip" ),}local prefabs = {}local start_inv = {-- Custom starting items}local common_postinit = function(inst) inst.soundsname = "maxwell"inst.MiniMapEntity:SetIcon( "druidb.tex" )endlocal master_postinit = function(inst)-- Stats inst.AnimState:SetMultColour(1, 1, 1, 0.5) inst.components.health:SetMaxHealth(100) inst.components.hunger:SetMax(100) inst.components.sanity:SetMax(100)endreturn MakePlayerCharacter("druidb", prefabs, assets, common_postinit, master_postinit, start_inv)Behold!I have no idea what is keeping it from working. Edited January 13, 2015 by Nyogtha Link to comment https://forums.kleientertainment.com/forums/topic/49095-query-does-instanimstatesetmultcolour-not-work-in-dst/#findComment-601634 Share on other sites More sharing options...
Sarcen Posted January 13, 2015 Share Posted January 13, 2015 Hmm, seems to be correct. The way I used it was when equipping an amulet. So it doesnt happen when the character gets created. Looking through some of the code there seem to be several places where it can get reset to default including on spawn. Looking into it I cant really find a good event to plug in to that triggers after the effect ends. There seems to be only one function, which is Show().inst._Show = inst.Showinst.Show = function (inst) inst._Show() inst.AnimState:SetMultColour(1, 1, 1, 0.5)endI'd definitely consider this a hack and not a clean solution tho Link to comment https://forums.kleientertainment.com/forums/topic/49095-query-does-instanimstatesetmultcolour-not-work-in-dst/#findComment-601639 Share on other sites More sharing options...
Nyogtha Posted January 13, 2015 Author Share Posted January 13, 2015 Not entirely sure where to drop that into the character's code. It seems like it should work from master_postinitBlegh Link to comment https://forums.kleientertainment.com/forums/topic/49095-query-does-instanimstatesetmultcolour-not-work-in-dst/#findComment-601646 Share on other sites More sharing options...
Sarcen Posted January 13, 2015 Share Posted January 13, 2015 @Nyogtha,There is actually an OverrideMultColour, you might want to try using that before doing the hacky stuff I suggested Link to comment https://forums.kleientertainment.com/forums/topic/49095-query-does-instanimstatesetmultcolour-not-work-in-dst/#findComment-601657 Share on other sites More sharing options...
Nyogtha Posted January 14, 2015 Author Share Posted January 14, 2015 Oh! Finally!!! That was it, thanks! Link to comment https://forums.kleientertainment.com/forums/topic/49095-query-does-instanimstatesetmultcolour-not-work-in-dst/#findComment-601659 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