Jump to content

Recommended Posts

11 hours ago, Well-met said:

I've managed to set up the brushable component for a live player, and other players can brush the recipient and everything surprisingly works very well.

However the target character cannot actually brush themselves. I'd like to achieve that but I don't know how. Any idea?

Unless there's something built into the component, it's gonna be hard. Once I'm back on my main computer I'll see what I can do to help you.

  • Like 1

It seems like if you want to use an action on yourself, you need to use rightclick, otherwise it won't work.

By adding an ComponentAction, you will be able to brush yourself.

Add this code to your modmain and it should work:

AddComponentAction("EQUIPPED", "brush", function(inst, doer, target, actions, right)
	if right and doer == target and target:HasTag("brushable") then
        table.insert(actions, ACTIONS.BRUSH)
    end
end)

This is only working if you have the brush equipped, if you want to use it when only holding it, you could try to add a component action for USEITEM with brush.

Edited by Monti18
  • Like 1
  • Potato Cup 1

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