Jump to content

Recommended Posts

Hello,  so I want to know is there a code to make an item glow a certain color?

Like the character ítem glow code from this topic:

By using this topic's code the char will take the color when equipping the item:

owner.AnimState:SetMultColour(1, 1, 1, 1)
owner.AnimState:SetAddColour(1, 0, 1, 0)
owner.AnimState:SetLightOverride(0)

But what about the color glow just affecting the ítem?

The most similar effect i've got is the haunted code which you put in the function fn:

inst.AnimState:SetHaunted(true)

Is it possible or am i going to far away?

Thanks in advance :D I know am asking a lot of questions lately, but i think it might gonna worth it.

5 hours ago, Jpianist said:

But what about the color glow just affecting the ítem?

In the function fn to change the color of the weapon I think all you need to add is

inst.AnimState:SetMultColour(1, 1, 1, 0.6) -- This was in the nightsword.lua so it will probably make your weapon's color transparent black.

you can probably change the numbers to get your desired color :).

Thanks @SuperDavid, it's exactly what i was looking for, the only problem is that the color shows when the weapon is on the ground, but when i equip the weapon i lose the color. Any ideas what could i do to have the weapon colored glowing permanent all the time?

Um, actually maybe how about you try adding "inst.AnimState:SetMultColour(1, 1, 1, 0.6)" in the 

local function onequip(inst, owner)


end

then maybe when you equip the item it will get the color, it probably won't work but it's worth giving it a try, I think :)?

EDIT: Never mind I tried it myself & it didn't work sorry :(

Edited by SuperDavid
2 hours ago, SuperDavid said:

Um, actually maybe how about you try adding "inst.AnimState:SetMultColour(1, 1, 1, 0.6)" in the 


local function onequip(inst, owner)


end

then maybe when you equip the item it will get the color, it probably won't work but it's worth giving it a try, I think :)?

EDIT: Never mind I tried it myself & it didn't work sorry :(

Well thanks for trying. Maybe i'm just asking for something impossible in the game's coding. It was an stetic thing i wanted to add, not really important, so it's okay.

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