Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Right now I'm trying to convert a string of text into an array of each individual word and it's working well. I am unsure how to figure out when the string ends though. I want the entire string iterated through so I have a full array of the words in the text. How do I go about looping until the end of the string? Do strings in construct have some unique end of string character I can test for?
Develop games in your browser. Powerful, performant & highly capable.
Use tokencount() and you don't need "i" variable:
For "n" from 0 to tokencount(text, " ")-1
Array push tokenat(text, loopindex, " ")
You can use tokencount(text, " ")
and replace i with loopindex.