jupiter1390 Posted October 28, 2021 Share Posted October 28, 2021 (edited) I'm making a character mod who gains sanity when feeding others, and is now adding additional character speech for that part When printing with print(act.invobject), it would result like goatmilk(LIMBO), and I want to change it into in-game item name string Also, directly putting the variable inside like this won't work inst.components.talker:Say(act.invobject) inst.components.talker:Say("eat "act.invobject) Is there any way to put variable directly into the Say component? And also is there any way to change item code string into in-game name string? Edited October 28, 2021 by jupiter1390 Link to comment https://forums.kleientertainment.com/forums/topic/134838-how-to-make-character-say-an-item-name-via-talker-componentsay/ Share on other sites More sharing options...
HarryPPP Posted October 28, 2021 Share Posted October 28, 2021 Using "inst.components.talker:Say("eat"..act.invobject.name)" should probably work. To get an item's current name you just need to add a ".name" after it. You see, to insert a variable into a string you need to put two dots between the strings and variables. 1 Link to comment https://forums.kleientertainment.com/forums/topic/134838-how-to-make-character-say-an-item-name-via-talker-componentsay/#findComment-1508376 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