Hey, thanks. I actually need to be able to do this dynamically at runtime based on another string in the fsm being the thing inserted. I will be constantly retrieving the names of game objects and storing them in string variables, and I need to be able to insert those into OTHER arbitrary strings.
what I am essentially doing is that you can ask any character about any examined object, and it will check their personal array for a specifically written response, and if there isn't one, if will build one based on several changing factors like the current character you have, the equipped item, etc. And for certain characters, they will have a pre-written "I don't know" response that will insert the relevant dynamic pieces as requested.
The examples I gave were just little examples in a much more hefty system. Using the build string method I'd have to dynamically SPLIT pre-existing response dialogue lines, then build the string with the requested wild card. So I'd have to make a parser to dissect each line and create and store new strings at each wild card, and considering I might have even dozens of wild cards per line, there is a potentially unlimited number of NEW strings I'd have to parse and split up first. An action to simply check the string for a wild card then replace what is needed would be much simpler.
In other words, using the suggested method, I'd need hundreds and hundreds of global variables, which isn't as handy as being able to name a game object then retrieve its name later.
A bonus of the requested action is that I could create entirely new sentences based on stored phrases that could be inserted whenever needed....
which makes me also want to request an action to test if a string contains a specific wild card. For example, any dialogue line that contains & will replace that with "Howdy, partner!" since & could be the universal symbol for "cowboy intro." I'll suggest that after this.