Download

Can strings be replaced in blueprint?

Lets say I have a data table with a string in it. I want the string to do something like replace text with a name during runtime, in the data table for the dialogue string, I put $NPCName to tell the code what string to search for and replace in the block of text. so a better example is this, lets say I have a static block of text, an NPC is talking to me and says:

“Whats your name?”

The player enters their name and in the block of text it would be:

“Oh so your name is $Name” where the code would find $Name and replace it with the players name or anything else i wanted it to.

Also, would it be able to make text buttons as well?

Hopefully somneone understands what im trying to say, I didnt articulate it very well but I dont really know how to explain it.

Are you asking for Replace / Replace Inline, or how to modify the Data Table???

yeah pretty much. I want the game to replace text with a name or something else at runtime without knowing what it is.