Jump to content

Say something at the end of the sentence


Recommended Posts

So I want to make it so when my character finishes a sentence she says a word at the end of it. Obviously the simple way of doing this is by entering the speech file and just manually adding it myself but I wonder if theres a way to do this by code?

 

Anything is appreciated!

Link to comment
Share on other sites

@rons0n, well, you can edit the talker component!

I like that because you can hook on to Say to edit the script with random words every time.

 

But to do specifically what you want:

local require = GLOBAL.requirelocal myspeech = require "speech_wilson"local function EditSpeech(val)	if type(val) == "table" then		for k, v in pairs(val) do			if type(v) == "table" then				EditSpeech(v)			elseif type(v) == "string" then				val[k] = val[k].." Bruh."			end		end	endendEditSpeech(myspeech)
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...