Jump to content

Add haunted-like sheen to object


Recommended Posts

Has anyone experimented with that? I've been looking as to how make any object have a nice colored sheen-like anim like when ghosts haunt them, but so far I've been unlucky.

The game just does inst.AnimState:SetHaunted(true) to add it, so it might be something in the C++ side.. in which case I'm out of luck.

Any ideas/suggestions?

Link to comment
Share on other sites

If you mean when you are holding it, then out of luck.

Otherwise, it's just doing the SetHaunted thing.

    inst:AddComponent("hauntable")
    local _OnUpdate = inst.components.hauntable.OnUpdate
    inst.components.hauntable.OnUpdate = function(self, dt)
        local _cooldowntimer = self.cooldowntimer
        _OnUpdate(self, dt)
        self.cooldowntimer = _cooldowntimer
    end
    inst.components.hauntable:DoHaunt()

Like this, timer never runs out.

Link to comment
Share on other sites

Oh, no I meant when it's on the ground. When you do AnimState:SetHaunted(true) it stays "haunted" forever (as in with the cool spooky animated white sheen).

I just want to recolor the haunted effect, the default is white, I want it red. Still, thank you~

Edited by Ryuushu
Link to comment
Share on other sites

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
 Share

×
  • Create New...