silvesary Posted December 19, 2021 Share Posted December 19, 2021 (edited) Hello, I am back! Anyways today I have a new interesting issue, now I'm trying to make a mod where a character when their sanity goes down, does not get naturally aggrod by shadow creatures unless they attack to aggro them(they will still spawn though). The true goal is to get this to work only with shadow monsters on the surface but not for the ruins/caves, but if it's too much trouble I don't mind just no natural aggro in general. I actually found some code that works for this and got it to work(thread here), however said code only works when I bring my sanity down with the nightmare amulet/bone helm. If I naturally lower my sanity by normal means like standing around evil flowers then the shadow creatures attack me on site like normal. Any suggestions or help on fixing this issue? will link my modmain.lua file too so you can see what we're working with here. modmain.lua Edited December 19, 2021 by silvesary Link to comment https://forums.kleientertainment.com/forums/topic/136317-solved-mod-chara-helpsanity-and-shadow-creature-issues/ Share on other sites More sharing options...
silvesary Posted December 19, 2021 Author Share Posted December 19, 2021 EDIT: oh my gosh I solved it, it was simple as actually fixing and adding the character tag LMFAO I'll leave this up here for reference for anyone that needs it, but by adding -- Tag for shadow creature aggro inst:AddTag("shadowfriend") to the prefab file and then adding said tag to the code shown above(which is in modmain), it will actually work! Link to comment https://forums.kleientertainment.com/forums/topic/136317-solved-mod-chara-helpsanity-and-shadow-creature-issues/#findComment-1525939 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