Data Tables and Strings. Making a Word Game.

Greetings everyone.

I’m learning Unreal, And i thought about making a word game, Which as proven to be a little more Complicated than i expected. (More likely i’m just very bad at understanding. I’m still learning a lot of things.) In Short, I want to create a grid of randomised Letters than can be dragged into another Box for the player to Form a Word.

I Have the Grid, It’s not ‘Working’ Right now but has previously, I’ve just been tinkering and it’s broken again, Currently i can just randomise the letters spawned using an Array. My Main question comes from Data Tables, I’ve struggled on these for a few days, Mostly digesting on how i can actually make it communicate how i want? I have a data table with thousands of words, Structured like this.

Say i had the Letters to make the Word ‘Car’ And i dragged them in.

How would i be able to tell the Letters formed that it actually matches whats in the Data Table?

Previously i thought maybe finding a way to assign each letter a Number to itself, (1-25) And then having it read from there as a string, So for example, Car would be ‘3118’ (C-3, A-1, R-13) And finding some way to link it back to the Data Table, But truthfully im just a little confused on how to make it all talk to eachother. Or where to even start with it after a lot of tinkering.

Currently i’ve been trying to append things like this? I’m just a little lost on How to create a Way to talk between eachother and i think the answers simple, I’m either over complicating it, Or severly missing the mark, And any help would be appreciated.

Blueprint in the Player Character, Though i should likely put this in the UI widget right?

This is it taken apart, Mostly because Currently i was hitting some Infinite loops and getting nowhere.

Many Thanks, And apologies if i’ve explained this poorly. Any help is appreciated.

your ‘words’ can also be RowNames then you can just use GetDataTableRow, if its found its a valid word.

1 Like

The blueprint you posted is on the right track. Auran’s suggestion is also a possibility, but only if you’re checking words as-spelled; it won’t work if you were to use it for something like a crossword puzzle.


If you were to do something like this, it would be best to store it in an integer array (“3”, “1”, “13”), but unless you need to parse a word backwards, where you might need to use the integer sum of all the word’s letters, it’s probably not necessary. You also need to handle duplicates in this case, as “RACE” and “CARE” would have the same integer sum value.


You might try to iterate over your “solution” boxes and append each valid character to a string, then check if that word is in the datatable by iterating over row names (your current method), or using Auran’s suggestion. It would also help to run it in a function that returns true or false depending on whether or not the row was found; this way you can play a widget animation based on the result, etc.


Keep in mind that string comparison operators can either be case sensitive or insensitive. If your widgets use uppercase, and your datatable uses lower, case-sensitive comparison will always evaluate as false; I believe you can also use ToUpper/ToLower on strings. If necessary, there’s also a node to get a character array from a string, although I can’t remember the exact name of it atm.