Jump to content

Recommended Posts

HI (again)
Last time, hopefully, as everything is now working wonderfully!
except! I don't know how to fix this and would appreciate some advice. 

My Fellow has an ever so slight glow to him. Only that doesn't reload when he's resurrected.  What am I missing to make it reload when the bloke is back to life?

Added his Lua. But let me know if you need any specifics. 

Here's the code for the glow too. 
 

Spoiler

    inst.entity:AddLight()
    inst.Light:Enable(true) 
    inst.Light:SetRadius(.6)
    inst.Light:SetFalloff(1)
    inst.Light:SetIntensity(.5)
    inst.Light:SetColour(235 / 255, 165 / 255, 12 / 255)
    
    inst:ListenForEvent("ms_respawnedfromghost", Glowybre)



I thought the 'respawnedfromghost' would make it work. Alas, doesn't. 

[edit] - needed to change the false to true! 

adam.lua

Edited by DevilsRoost

In Glowbrye, you disable the light by making it false

 

local function Glowybre(inst)
    -- This replaces the old GlowingBre local variable.
    
    inst.Light:SetRadius(.6)
    inst.Light:SetFalloff(1)
    inst.Light:SetIntensity(.5)
    inst.Light:SetColour(235 / 255, 165 / 255, 12 / 255)
    inst.Light:Enable(false)
end

You'd need to make it true.

local function Glowybre(inst)
    -- This replaces the old GlowingBre local variable.


    inst.Light:SetRadius(.6)
    inst.Light:SetFalloff(1)
    inst.Light:SetIntensity(.5)
    inst.Light:SetColour(235 / 255, 165 / 255, 12 / 255)
    inst.Light:Enable(true)
end

  • Like 1

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