So in the namesDefault variable you have a string which is a list of animals separated by a comma (",")
The list looks like this:
Set text to tokenat picks one of these words from the string.
It needs 3 parameters - string, index (counting from 0) and text separator.
For example, if you want to pick the first word from this string (which is dog), you should do this:
tokenat (namesDefault, 0, ",")
where first parameter: namesDefault (your string)
second parameter: 0 (index of dog in the string)
third parameter: "," (separator - which in your case is comma, should be in quotation marks)[/code:31ny4hvn]
Now you can change this formula to whatever you want. Try one of these:
[code:31ny4hvn]tokenat (namesDefault, loopindex("tileX"), ",")
tokenat (namesDefault, loopindex("tileY"), ",")
tokenat (namesDefault, loopindex("tileX") * (FIELD_WIDTH-1) + loopindex("tileY"), ",")[/code:31ny4hvn]
Or you can get rid of tokenat altogether and pick names using some other method.
Say, a simple random:
Set text to Choose("John","Mary","Steve","Samantha")