GalloViking Posted December 19, 2021 Share Posted December 19, 2021 (edited) Greetings fellas, I'm back to work on my beekeeper character and I'm struggling to get a perk done. Long story short, I want my character to be able to catch bees with a bugnet without getting aggro. I've been looking at the beecommon brain and this function looked promising: local function OnWorked(inst, data) OnAttacked(inst, {attacker=data.worker}) end But no matter how hard I try to add an exception for my character, bees and beehives still attack him. Any help would be welcome at this point. Edited December 21, 2021 by GalloViking Link to comment https://forums.kleientertainment.com/forums/topic/136322-how-to-remove-aggression-from-catching-bees/ Share on other sites More sharing options...
GalloViking Posted December 21, 2021 Author Share Posted December 21, 2021 Update! I have succesfully managed to get it to work like I want it to using this code: local function OnWorked(inst, data) if data.worker and data.worker:HasTag("my_character") then return else OnAttacked(inst, {attacker=data.worker}) end end Thing is, this is a modification I've made directly to the brains/beecommon.lua file. Is there a way to add these changes to my modmain.lua without touching base game file? Link to comment https://forums.kleientertainment.com/forums/topic/136322-how-to-remove-aggression-from-catching-bees/#findComment-1526815 Share on other sites More sharing options...
ScardyFluff Posted December 22, 2021 Share Posted December 22, 2021 I don't know if this will work from the get-go, but try adding it to the: "your_character".lua in the prefabs folder! Specifically in the local function! Link to comment https://forums.kleientertainment.com/forums/topic/136322-how-to-remove-aggression-from-catching-bees/#findComment-1527061 Share on other sites More sharing options...
GalloViking Posted December 23, 2021 Author Share Posted December 23, 2021 (edited) On 12/22/2021 at 1:17 AM, GoldenMistML said: I don't know if this will work from the get-go, but try adding it to the: "your_character".lua in the prefabs folder! Specifically in the local function! I've tried and while the game didn't crash, it also doesn't work. Though, it's not very important since I have removed that perk from the character. Thanks for your help nonetheless! Edited December 23, 2021 by GalloViking Link to comment https://forums.kleientertainment.com/forums/topic/136322-how-to-remove-aggression-from-catching-bees/#findComment-1527539 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