Jump to content

Recommended Posts

Basically, I want to make it so that neutral mobs such as Pigmen and Bunnymen, for example, become hostile towards the player whenever they're wearing a Krampus Sack, but I can't seem to work out what I need to do in order for that to work. I tried looking at the Spider Hat's code to see if I could find anything about how tagging players as monsters works, but I still have no clue on how to do that properly. Any help?

You need to check the retarget function of the prefabs you're interested in. With both pigmen and bunnymen and the pigmen-esque mobs, they all retarget on entities with the monster tag. So what you can do is you can overwrite the onequipfn of the equippable component and add the monster tag there, and then remove the tag in the onunequipfn. It is the character to whom you are adding the tag, since it is the character whom the mobs are targetting, and not the items!

Edited by Bad Willow
  • Like 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...