Jump to content

Recommended Posts

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

http://forums.kleientertainment.com/topic/55584-help-componentstalkersay-how-to-make-messages-last-longer/

 

Add a

if self.inst.prefab ~= "mychar" then	returnend

there to make it specific for the character, or put the code inside the common_postinit of the character.

@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 by rons0n

@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

@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.

 

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...