Jump to content

Recommended Posts

Hello! i am trying to make my item do a few different things, but i want these things to happen depending on the character.

i want it to follow something like:

If Character HasTag"August_skill", then: everyone gets an attack boost

elseIf character HasTag"Beefalo_tamer", then: beefalo horn effect

Else(doesnt have either tag), then: that character gets 15 sanity.

As of now, other than retexturing the item and re naming it, the item is a direct copy of the beefalo horn.

(I'm only asking for how to do the whole "depending on the character" code, but if you want, you can help with the actual effects)

 

1 hour ago, Augustusc said:

Hello! i am trying to make my item do a few different things, but i want these things to happen depending on the character.

i want it to follow something like:


If Character HasTag"August_skill", then: everyone gets an attack boost

elseIf character HasTag"Beefalo_tamer", then: beefalo horn effect

Else(doesnt have either tag), then: that character gets 15 sanity.

As of now, other than retexturing the item and re naming it, the item is a direct copy of the beefalo horn.

(I'm only asking for how to do the whole "depending on the character" code, but if you want, you can help with the actual effects)

 

just use the code from your other thread and add a check for the Tag, where is the problem?

The "problem" is for this particular item, i want anyone to be able to use it, just different effects depending on the character. my other thread was related to only one character being able to use a different item.

if it makes it easier to understand, you could say i want this single item to start fires if willow uses it, cause a sanity drain if maxwell uses it, and spawns ghosts if wendy uses it.

Edited by Augustusc

could you please link your other thread in your opening post? I will then take a look at the code.
But from what I remeber you should be able to use mostly the same code, but instead of checking for the tab, you can check inst.prefab=="wilson"  and then do the new stuff. It should not be a big deal, at least if you know how to start fire, drain sanity and so on.

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