Gnightmares Posted September 22, 2019 Share Posted September 22, 2019 I wanted to make a mob (Tallbird specifically) be neutral towards a certain character, such as webber with spiders. How would i make a tag for that? Link to comment https://forums.kleientertainment.com/forums/topic/112022-certain-mobs-neutral-to-a-custom-character/ Share on other sites More sharing options...
Ultroman Posted October 1, 2019 Share Posted October 1, 2019 Tallbirds go after any entity with the tags "character" or "animal" (as evident in their brain file). They cannot, however, target entities with the tags "smallbird" or "companion". These tags, however, are also used for several other things in the game, so I would not put them on your character willy nilly. There is a workaround, though. You can change the CanTarget function of their combat component, and then return false if the target is your character. Put this in your modmain.lua. AddPrefabPostInit("tallbird", function(inst) local oldCanTarget = inst.components.combat.CanTarget inst.components.combat.CanTarget = function(self, guy) if guy and guy.prefab == "your_character_prefab_name" then return false end return oldCanTarget(self, guy) end end) Link to comment https://forums.kleientertainment.com/forums/topic/112022-certain-mobs-neutral-to-a-custom-character/#findComment-1266697 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