Jump to content

Recommended Posts

Hi there, very new to modding and I'm working on a character mod based on the concept of a 'grave robber'.
I have been able to accomplish most of what I set out to accomplish with this character but one thing that I would like to do that I haven't figured out yet would be for this character to be able to dig graves without the sanity loss that comes with it. It's really such a small part of the game that I could basically ignore, but it would be a neat little finishing perk for this character.
Any help would be greatly appreciated.

Maybe u can recicle this code Other post

using the first part of the code whit little changes in "bugnet or net" using the word "shovel" and the target a " mound " using the dodelta of sanity 10 because " Each grave dug costs the player 10 Sanity " then instead of lose 10 sanity u will gain 10 too then the balance is 0

Edit:

maybe can work any like this code, but i dont know if the event its finishedwork or other :S

Spoiler

AddPrefabPostInit(
    "wilson",
    function(inst)
        inst:ListenForEvent(
            "finishedwork",
            function(inst, data)
                if(data and data.target and data.target.prefab=="mound")
                then
                    if(data.action and data.action.id=="shovel")
                    then
                        if(inst and inst.components and inst.components.sanity)
                        then
                            inst.components.sanity:DoDelta(10)
                        end
                    end
                end
            end
        )
     end
)

 

 

Edited by leprucio
adding code

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