Batch upload of children to an array

I have a list of words separated by line and by comma, it’s around 80k, what I need is to have that list in my game so I can compare it, this is in order to compare what the player enters against the list and if it is valid, he/she earns points. But since there are 80 words, it is too many to enter them one by one, And I don’t know how to do it because the game is designed to be played without an internet connection.
I come from this thread that was already old

[quote=“runforever, post:1, topic:21499, full:true”]
To split one sentence to words. then create text object for each word.
There is one option to control a random position or not.

Here is 1 way to do it without using an array. You can use the text as1 text or maybe break it down by word length to optimize the search if needed. You could then search the text based on word length.

This example used a space as a seperater but the same would apply for commas. It’s import that the text is consistent. It must be something like ,apple,orange,grape,

I already tried it but it doesn’t work for me, I don’t know what I’m applying wrong, I’ll leave you the images so you can see how I’m doing it
image
image

What word are you trying to find. Note, capitalization matters. If the case might not always be lower, you can use ToLowerCase() with the typed text. Also, in the most recent version of GD. You don’t need to use the Variable() expressions. You can just use the variable name regardless of whether it’s Global or Scene or string, number or boolean.

On last thing. You only need 1 comma between the words. The last comma for the 1st word becomes the first comma for the next word.

Thanks, I don’t remember how I solved it but I remember it was something about how I was writing things, in the end I was able to use it for now and that’s fine but then I think I need another solution since at the moment I only enter search words from an entire dictionary that is around 130k words, then I want to add plural words and other types of words, thanks for the help

1 Like