JackyHann Posted July 17, 2016 Share Posted July 17, 2016 This is a pretty simple problem, but I couldn't find anyone with the same problem. How do I make a character simply not be attacked in the dark? Link to comment https://forums.kleientertainment.com/forums/topic/68901-grue-invincibility/ Share on other sites More sharing options...
CarlZalph Posted July 17, 2016 Share Posted July 17, 2016 2 hours ago, JackyHann said: This is a pretty simple problem, but I couldn't find anyone with the same problem. How do I make a character simply not be attacked in the dark? someplayer.components.grue:AddImmunity("myuniquemodname") Then remove it via: someplayer.components.grue:RemoveImmunity("myuniquemodname") Link to comment https://forums.kleientertainment.com/forums/topic/68901-grue-invincibility/#findComment-793832 Share on other sites More sharing options...
JackyHann Posted July 17, 2016 Author Share Posted July 17, 2016 How do I plug that into a custom character's scripts? Or where? Link to comment https://forums.kleientertainment.com/forums/topic/68901-grue-invincibility/#findComment-793897 Share on other sites More sharing options...
CarlZalph Posted July 17, 2016 Share Posted July 17, 2016 7 hours ago, JackyHann said: How do I plug that into a custom character's scripts? Or where? Shove it after the prestine state and mastersim check. Where all the other component stuff goes. Link to comment https://forums.kleientertainment.com/forums/topic/68901-grue-invincibility/#findComment-793944 Share on other sites More sharing options...
JackyHann Posted July 18, 2016 Author Share Posted July 18, 2016 What? I...sorry, I'm a junior member. I copy/pasted someplayer.components.grue:AddImmunity("harvard") under local function common_postinit(inst) someplayer.components.grue:AddImmunity("harvard") end in the lua file of my character's prefab folder, and it didn't work... Link to comment https://forums.kleientertainment.com/forums/topic/68901-grue-invincibility/#findComment-794418 Share on other sites More sharing options...
DarkXero Posted July 18, 2016 Share Posted July 18, 2016 local function master_postinit(inst) inst.components.grue:AddImmunity("harvard") end Link to comment https://forums.kleientertainment.com/forums/topic/68901-grue-invincibility/#findComment-794454 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