Procedural Text on Static Mesh? (For a signpost)

Hi all,

I’m new, very new in fact, to all of this, so a thousand apologies in advance for whatever social or a technical faux pas this inevitably leads to.

I have a sign post static mesh (it’s a crossroads, 4-way sort of affair, you know the one.) I can add text to this via a component in Blueprint, right? So I can write a ‘destination’ on each of the signs manually. I’m making lots of them though, many that I want nonsense written on. Is there a way, via Blueprint, to have it generate a random string of characters to a certain number and have it put that on each sign? Procedural text, I suppose? OR could I create an array of strings that it could use, and have a procedural system that chose a different, random one to put on each sign?

Hope that makes sense, it seems not even my technical signpost-based vocabulary is up to scratch.

Thanks!

Rob

I’d use an array of strings, or perhaps a DataTable; using Math.RandomInRange(or BP equivalent) to pick one.

Unfortunately, creating a custom DataTable design requires some C++, mainly a FTableRowBase subclass. It has the advantage of allowing you to define your strings in a central location, and externally edit them. A plain array is perfectly doable in BPs, although the storage may require some finagling.

Once you’ve determined the string, setting the displayed text of the Text Component simply requires either a variable assignment or a function call passing the new string, depending upon the state of the API.

Hi

This is going to be a little vague, sorry.

You could use widgets to display the town names. When placing the signpost blue print, you might be able to get it to search for the closest town, get the town name maybe from a data point in that town and auto fill in the widget.

Would be a little work to start with, but then you just to put them in the map and done.

Other way, make Structure / array of all town names, make it editable, then when you place it, use the drop down in editor to choose town.

Cheers for the response guys! Will keep digging, and give these ideas a whirl. They both made sense in theory. Practise is a different matter, ha. Figured it might be quite complicated though so :slight_smile: Wish me luck!