MysticWolf1147 Posted January 18, 2015 Share Posted January 18, 2015 Hey guys, So, i made a character that glows, and the glow works fine in both day and night, but when that character dies and respawns via telltale heart or portal, her glow is missing! Does anyone know how to fix this? Thanks in advance,MysticWolf1147 Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/ Share on other sites More sharing options...
rezecib Posted January 18, 2015 Share Posted January 18, 2015 @MysticWolf1147, You need to do something like this:inst:ListenForEvent("ms_respawnedfromghost", RestoreLight) Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/#findComment-603428 Share on other sites More sharing options...
MysticWolf1147 Posted January 19, 2015 Author Share Posted January 19, 2015 @MysticWolf1147, You need to do something like this:inst:ListenForEvent("ms_respawnedfromghost", RestoreLight)Thank you! I'll try that out! Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/#findComment-603621 Share on other sites More sharing options...
MysticWolf1147 Posted January 19, 2015 Author Share Posted January 19, 2015 It didnt seem to work It came up with a crash Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/#findComment-603630 Share on other sites More sharing options...
rezecib Posted January 19, 2015 Share Posted January 19, 2015 @MysticWolf1147, I said "something like this" -- you can't just use that directly, you need to write a function RestoreLight that reactivates the light. The thing is that ghosts have light, so when the character respawns it turns the light off. You just have to turn it back on again, and reset the size of the light. Should be pretty similar to your initial code for creating the glow. Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/#findComment-603632 Share on other sites More sharing options...
MysticWolf1147 Posted January 29, 2015 Author Share Posted January 29, 2015 Anyone care to help write a function that restores light on resurrection for me? Ive tried to write one but i cant get it to work cause im a noob any help would be greatly appreciated! Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/#findComment-607578 Share on other sites More sharing options...
Jjmarco Posted January 29, 2015 Share Posted January 29, 2015 (edited) @MysticWolf1147, as rezecib said, just put the same code you used to give that character glow in the first place.local function RestoreLight(inst) -- Put the code that you used to give your character glow hereendinst:ListenForEvent("ms_respawnedfromghost", RestoreLight) Edited January 29, 2015 by Jjmarco Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/#findComment-607594 Share on other sites More sharing options...
MysticWolf1147 Posted January 29, 2015 Author Share Posted January 29, 2015 Thank you both! I used one that someone else had used in their mod and it was wrong. works great now! Link to comment https://forums.kleientertainment.com/forums/topic/49338-glow-is-missing/#findComment-607609 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