Jump to content

Recommended Posts

Okay so as the title says, I want to figure out how to make a wearable object grant lunacy/enlightenment when worn, but the thing is... the equippable thingy doesn't have the same stuff as the parameters that player characters can use. 

see this is what I use on my character to give them lunacy by default

inst.components.sanity:EnableLunacy(true, "Default")

the only thing I can think of is to give a tag and have a seperate function give anyone with that tag lunacy? But I'm not quite sure how to do such a thing

Change "inst" to "owner" to target the character wearing the item.

Quote

owner.components.sanity:EnableLunacy(true, "Default")

How you apply it is up to you, but I just shoved it in the OnEquip to test it and it worked. You'll have to turn it back off again in the OnUnequip though. I'm sure there's a more elegant way to do it (I am not a programmer), but that will get you started.

Edited by Chesed
36 minutes ago, Chesed said:

Change "inst" to "owner" to target the character wearing the item.

How you apply it is up to you, but I just shoved it in the OnEquip to test it and it worked. You'll have to turn it back off again in the OnUnequip though. I'm sure there's a more elegant way to do it (I am not a programmer), but that will get you started.

OH! I forgot to change the owner things. Thanks!

actually- how would I disable it?

  • Like 1

Oh my goodness, I'm so sorry: I completely glazed over your other question.

In case you haven't done it by now, put this in the OnUnequip:

Quote

owner.components.sanity:EnableLunacy(false, "Default")

I don't know if this will have any other effects but it seems to play nice with the Lunar Island's enlightenment.

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