I'm working on a game currently that has an inventory system. I think it would be nice for item names to be colored when mentioned in dialog so the player knows to pay attention to them. I think Zelda is a good example of a game that does something like this.
Since a bit of searching taught me that there's no proper way to do something like this, I thought up a rather hacky way of making it happen, but I need some advice on how plausible it is. My idea is that I can add an identical sprite font with colored text and then overlay it on the white sprite font, add enough spaces until I get to the word I want to color, then type only that word.
This works perfectly when done manually, but the problem is making it work automatically...how can I write an event that copies the text of another sprite font object, replaces the first X characters with spaces, then writes the one or two words I want in color? If it helps, the item names are often called in through functions (so a typical line of dialog would be something like "That's a very nice " & Function.Param(0) & " you got there." and I would want the parameter to appear in color).
Attached is an example of the effect I'm going for.