Korvus17 Posted September 19, 2022 Share Posted September 19, 2022 So I'm quite new to coding, let alone using LUA. I can't figure out how to make my character not lose sanity from player ghosts. I also need help with making the ghost mobs neutral towards my character like spiders are to Webber. Thanks for reading! Link to comment https://forums.kleientertainment.com/forums/topic/143291-code-to-make-my-character-not-lose-sanity-from-player-ghosts/ Share on other sites More sharing options...
SunRiver Posted September 21, 2022 Share Posted September 21, 2022 --in your character.lua function master_postinit(inst) --not lose sanity from player ghosts. inst.components.sanity:SetPlayerGhostImmunity(true) end 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/143291-code-to-make-my-character-not-lose-sanity-from-player-ghosts/#findComment-1599104 Share on other sites More sharing options...
Korvus17 Posted October 1, 2022 Author Share Posted October 1, 2022 On 9/20/2022 at 9:23 PM, SunRiver said: --in your character.lua function master_postinit(inst) --not lose sanity from player ghosts. inst.components.sanity:SetPlayerGhostImmunity(true) end Thank you so much! this helped a lot, I can't believe it was this simple. Link to comment https://forums.kleientertainment.com/forums/topic/143291-code-to-make-my-character-not-lose-sanity-from-player-ghosts/#findComment-1599969 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