Hi everyone, thanks for checking
How do i check for multiple possible words from a variable?
i have already made this drag n drop word shuffling game where player could shuffle each letter to form a word, im using “formedword” as player inputted variable and checks if the word is valid from “wordlist” variable
I already got it to work using strfind, but its only check for valid 4 letters word, for example if the player shuffled word “OLDC” i want it also detects “OLD” as valid word if they dont know the word COLD, but if they guessed right with words with more letters it checks that one, ignoring the fewer letter words.
english is not my first languange, sorry if there is any confusion
In my example, I added an array with the words [ate, rate, tear, tea]. The event loops through every word in the list and checks if it “contains” the guess (scrambled) word.
First the word “ate” will be matched, then if the length of a new match > previous match, then update the new matched word “rate”.
Just make sure to reset the matched word to " " after every guess.
I’ve tried your solution and it works perfectly the way i want, however is it possible to do this with bigger words list?, im trying to add a whole dictionary, and adding 1000+ each word manually in the gdevelop array already sounds impossible.
this is what my method before, im using a structure variable with 3 wordlist, each contain approx 500+ words, i divided to 3, cause if i put more word on single variable the gdevelop app becomes unresponsive, idk if this an optimal method but it works.