Jump to content

[HELP] components.talker:Say - how to make messages last longer?


Recommended Posts

-- parameters(script, time, noanim, force, nobroadcast, colour)

So for a 20 second message:

ThePlayer.components.talker:Say("Hello", 20)

If you want to change the default 2.5 time of the Say function of talker:

local mintime = 7AddComponentPostInit("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)
Link to comment
Share on other sites

@DarkXero, let me to show you a little bit shorter answer: :)

local mintime = 7AddComponentPostInit("talker", function(self)    local old = self.Say    self.Say = function(self, script, time, ...)        if time == nil or time < mintime then            time = mintime        end        old(self, script, time, ...)    endend)

Link to comment
Share on other sites

DarkXero, Maris,  can i implement this on server side or only on client side?

 

I dont know whats wrong with this forum, but mine thread is duplicated. First thread i've started yesterday but didnt see him after 6 hours i've started another.

 
Link to comment
Share on other sites

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
 Share

×
  • Create New...