Abatrozz Posted December 23, 2014 Share Posted December 23, 2014 The problem I had in my mod is that when player died and got revived, the speed of the character went back to default Wilson's speed. So, are there any onRevive function, where it triggers when the character got revived? (like, onLoad, onSave thing) or any method that could fix this? Thanks : )-Abatrozz Link to comment https://forums.kleientertainment.com/forums/topic/47364-problem-with-character-speed-when-revived-and-do-we-have-onrevive-function/ Share on other sites More sharing options...
rezecib Posted December 23, 2014 Share Posted December 23, 2014 @Abatrozz, What I used for Webber (who has similar issues with being slowed by webs and such again upon revival was this:local function DontTriggerCreep(inst) inst.components.locomotor.triggerscreep = false inst.components.locomotor:SetSlowMultiplier(1)endlocal function master_postinit(inst) -- lots of master_postinit stuff inst:ListenForEvent("ms_respawnedfromghost", DontTriggerCreep) DontTriggerCreep(inst) -- more master_postinit stuffend Link to comment https://forums.kleientertainment.com/forums/topic/47364-problem-with-character-speed-when-revived-and-do-we-have-onrevive-function/#findComment-591561 Share on other sites More sharing options...
Abatrozz Posted December 23, 2014 Author Share Posted December 23, 2014 @rezecib oh, thanks a lot : )This is really helpful. I really find it interesting using these trigger, but sometimes I can't find the list of those triggers, unless rumbling through the scripts. I wonder if there's anyone who would made a list of those triggers. At least for the reference : ) Anyway, thanks again : D Link to comment https://forums.kleientertainment.com/forums/topic/47364-problem-with-character-speed-when-revived-and-do-we-have-onrevive-function/#findComment-591618 Share on other sites More sharing options...
rezecib Posted December 23, 2014 Share Posted December 23, 2014 @Abatrozz, There's no list. There's really no substitution for just digging through the game's code-- if you want to know how the game does things, and what things you can hook into to run your mod code, you just have to read the game code. In this case, I started with player_common and saw that the ms_respawnedfromghost event was pushed after it reset the player's locomotor stuff. Link to comment https://forums.kleientertainment.com/forums/topic/47364-problem-with-character-speed-when-revived-and-do-we-have-onrevive-function/#findComment-591812 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