Sign in to follow this  
Atgood1

How do I make a character silent?

Recommended Posts

Atgood1    10

I've tried using inst.components.talker:IgnoreAll(), and this works for the most part, however after certain actions my character is able to talk again. An example is after waking up from using a telelocator staff. Does anyone know a code to truly make a character silent?

Share this post


Link to post
Share on other sites
DarkXero    2892

Option one, sound but no lines over head:

inst.components.talker.mod_str_fn = function() return "" end

Option two, no sound, no lines over head:

inst.components.talker.Say = function() end

Option three, the right way:

inst:AddTag("mime")

Share this post


Link to post
Share on other sites
przemolsz    32
inst:AddTag("mime")inst.sg.sg.events["ontalk"] = EventHandler("ontalk", function() end)

This seems to do the job. It uses Wes' mechanics, just removing the part managing his pantomime.

 

Share this post


Link to post
Share on other sites
Atgood1    10

 

inst:AddTag("mime")inst.sg.sg.events["ontalk"] = EventHandler("ontalk", function() end)

 

Adding that line seems to have fixed it. Thank you both for your help :grin:

Share this post


Link to post
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
Sign in to follow this