rons0n Posted October 29, 2015 Share Posted October 29, 2015 So I noticed as I added long audio files that my character would cut from talking because switching from 'Talking' animation to 'Idle' animation cancels the audio. Is there a way to prolong the talking animation for maybe a few seconds more? This would apply to talking, examining, events, everything. I just want him in his talking animation longer so his audio won't get cut off midway. Link to comment https://forums.kleientertainment.com/forums/topic/58734-extend-talking-animation/ Share on other sites More sharing options...
DarkXero Posted October 29, 2015 Share Posted October 29, 2015 http://forums.kleientertainment.com/topic/55584-help-componentstalkersay-how-to-make-messages-last-longer/ Add aif self.inst.prefab ~= "mychar" then returnendthere to make it specific for the character, or put the code inside the common_postinit of the character. Link to comment https://forums.kleientertainment.com/forums/topic/58734-extend-talking-animation/#findComment-683219 Share on other sites More sharing options...
rons0n Posted October 29, 2015 Author Share Posted October 29, 2015 (edited) @DarkXero, I added it as is but nothing happend. I could possibly be doing it wrong but I feel like I'm not, unsure. Then I added it with the character specific line(Which im sure i added it incorrectly anyway lol) and it also did not do anything. How do I add it to the common_postinit? Remove the postinit from AddComponentPostInit or leave it as is?local mintime = 60AddComponentPostInit("talker", function(self) local old = self.Say self.Say = function(self, script, time, noanim, force, nobroadcast, colour) if time == nil or time < mintime then time = mintime end old(self, script, time, noanim, force, nobroadcast, colour) endend) Edited October 29, 2015 by rons0n Link to comment https://forums.kleientertainment.com/forums/topic/58734-extend-talking-animation/#findComment-683230 Share on other sites More sharing options...
DarkXero Posted October 29, 2015 Share Posted October 29, 2015 @rons0n, well, I'm dumb. The stategraph times out the talking.local mintime = 10local function common_postinit(inst) local talker = inst.components.talker local old_Say = talker.Say talker.Say = function(talker, script, time, ...) if time == nil or time < mintime then time = mintime end old_Say(talker, script, time, ...) endendlocal function master_postinit(inst) local old_onenter = inst.sg.sg.states.talk.onenter inst.sg.sg.states.talk.onenter = function(inst, noanim) old_onenter(inst, noanim) inst.sg:SetTimeout(mintime + math.random() * 0.5) endend Link to comment https://forums.kleientertainment.com/forums/topic/58734-extend-talking-animation/#findComment-683248 Share on other sites More sharing options...
rons0n Posted October 29, 2015 Author Share Posted October 29, 2015 @DarkXero, Yeah! No longer do I have to endure sentences being cut. Which doesn't really matter as I don't know any Japanese but for people with English Audio files this helps too! Also I hope I gave enough credit to you on that Damage indicator mod! As always, thanks for helping this idiot for as long as I could remember. Link to comment https://forums.kleientertainment.com/forums/topic/58734-extend-talking-animation/#findComment-683258 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