-Penta- Posted November 7, 2021 Share Posted November 7, 2021 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? Link to comment https://forums.kleientertainment.com/forums/topic/135153-how-to-add-tags-to-certain-items/ Share on other sites More sharing options...
skittles sour Posted November 8, 2021 Share Posted November 8, 2021 (edited) 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 November 8, 2021 by Bad Willow 1 Link to comment https://forums.kleientertainment.com/forums/topic/135153-how-to-add-tags-to-certain-items/#findComment-1511557 Share on other sites More sharing options...
-Penta- Posted November 8, 2021 Author Share Posted November 8, 2021 That makes a lot of sense, actually. I'll try that and see if it works, thanks! Link to comment https://forums.kleientertainment.com/forums/topic/135153-how-to-add-tags-to-certain-items/#findComment-1511604 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now