Jump to content

Recommended Posts

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 by jupiter1390

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.

  • Thanks 1

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