Jump to content

Recommended Posts

Hello, I need help I just can't figure this out :(..

So, basically I want to make my player with a certain value and stuff can only see some prefab while other players can't see that prefab unless they have the values and stuff.

I tried looking into the bunnyman and rabbit to see how their insanity thing works, but I don't understand how to use it.

 

Thanks for any help and thanks for reading my problem, have a great day/night :D!!

Did you still need help to figure this out? I also wanted to look into this, here's what I found.

On the bunnyman prefab, the normal build is set:

    inst.AnimState:SetBuild("manrabbit_build")

then the important code for a different build being used for client side when insane:

    inst.AnimState:SetClientsideBuildOverride("insane", "manrabbit_build", "manrabbit_beard_build")

From what I can see "SetClientSideBuildOverride" only deals with change in sanity. From player_classified lua:

local function UpdateAnimOverrideSanity(parent)
    parent.AnimState:SetClientSideBuildOverrideFlag("insane", parent.replica.sanity:IsInsanityMode() and (parent.replica.sanity:GetPercentNetworked() <= (parent:HasTag("dappereffects") and TUNING.DAPPER_BEARDLING_SANITY or TUNING.BEARDLING_SANITY)))
end

Is the prefab part of your mod? if so, you can easily use the SetClientSideBuildOverride code on the prefab. However this will only deal with the players sanity value, I'm not sure which value you wanted to work with in particular. I've tested it and works fine for me.

Hope this could help you understand it better or someone else looking into this :)

Also, by looking at bunnyman prefab it is possible to set a differnt loot outcome for the two states as well as a sanity aura for the "...beard_build" state.

edit: What I wonder is how the change in damage is done for the beard state as I don't see it in the bunnyman code but I notice the setting "BEARDLORD_DAMAGE" in tuning..

 

Edited by maliblues

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