Jump to content

Recommended Posts

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!

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. :razz:

Edited by Nyogtha

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)end

I'd definitely consider this a hack and not a clean solution tho :p

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
×
  • Create New...