. . . Posted June 10, 2016 Share Posted June 10, 2016 Hello, I have a question! So, I want to give my mod character some special mode he can enter & I thought it would be cool if he could glow while in that keyhandler action mode thingy . So... Is it possible to put the haunt glow on characters forever then remove it on a certain event? I would super really duper amazingly appreciate any kind of help at all, thank you so, SO much for reading my question ! I hope you have a wonderful, amazing great day/night ! Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/ Share on other sites More sharing options...
DarkXero Posted June 10, 2016 Share Posted June 10, 2016 27 minutes ago, SuperDavid said: So... Is it possible to put the haunt glow on characters forever then remove it on a certain event? inst.AnimState:SetHaunted(true) true to turn it on. false to turn it off. Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/#findComment-781732 Share on other sites More sharing options...
. . . Posted June 10, 2016 Author Share Posted June 10, 2016 Wow , thanks so much DarkXero !! Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/#findComment-781743 Share on other sites More sharing options...
. . . Posted June 10, 2016 Author Share Posted June 10, 2016 Sorry to bother you again DarkXero, but you wouldn't happen to know how to make a character receive no stun/hit animation when getting hit then changing it back to them being able to get stunned after like a event? Would you ? Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/#findComment-781746 Share on other sites More sharing options...
DarkXero Posted June 10, 2016 Share Posted June 10, 2016 (edited) 44 minutes ago, SuperDavid said: no stun/hit animation when getting hit inst.AdamDontGetHit = true 44 minutes ago, SuperDavid said: changing it back to them being able to get stunned inst.AdamDontGetHit = nil This thing in modmain enables you to use the stuff mentioned. AddStategraphPostInit("wilson", function(sg) local _attacked = sg.events.attacked.fn sg.events.attacked.fn = function(inst, data) local old_stunlock = nil local attacker = nil if inst.AdamDontGetHit then data = data or {} attacker = data.attacker data.attacker = data.attacker or {} data.attacker.components = data.attacker.components or {} data.attacker.components.combat = data.attacker.components.combat or {} old_stunlock = data.attacker.components.combat.playerstunlock data.attacker.components.combat.playerstunlock = GLOBAL.PLAYERSTUNLOCK.NEVER inst.sg.timeinstate = 0 end _attacked(inst, data) if inst.AdamDontGetHit and attacker and attacker:IsValid() then attacker.components.combat.playerstunlock = old_stunlock end end end) Edited June 10, 2016 by DarkXero Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/#findComment-781749 Share on other sites More sharing options...
. . . Posted June 10, 2016 Author Share Posted June 10, 2016 6 minutes ago, DarkXero said: inst.components.combat.playerstunlock = PLAYERSTUNLOCK.NEVER I put this in his prefab.lua masterpostinit but he still plays the animation when getting hit. Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/#findComment-781752 Share on other sites More sharing options...
DarkXero Posted June 10, 2016 Share Posted June 10, 2016 36 minutes ago, SuperDavid said: I put this in his prefab.lua masterpostinit but he still plays the animation when getting hit. It turns out that those values are for monsters, not the player. I updated the post. Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/#findComment-781767 Share on other sites More sharing options...
. . . Posted June 10, 2016 Author Share Posted June 10, 2016 Thank you so, so very much DarkXero !!! Now I can implement my new keyhandler action, thank you so very much !!! You're super great help, really I can't say thank you enough !!!!!!!!!!!!! Link to comment https://forums.kleientertainment.com/forums/topic/68047-is-it-possible-to-make-character-glow-as-if-being-haunted/#findComment-781771 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