Text Puzzles

Text puzzles provide means for various operations with text in your Puzzles scenario.

"text"

This universally used puzzle provides the means to supply some text (a character, word or line) to your Puzzles scenario.

The text puzzle is often used with puzzles from different categories. Particularly, you can specify URL inputs to scene loader puzzles, HTML element ids, CSS rules and colors to HTML puzzles, and ids and URLs to some other puzzles.

This puzzle can also be used to provide names for objects, materials, animations or groups instead of the relevant selector puzzles, which may come in handy for dynamically loaded content.

Finally, some puzzles are configurable to provide textual input instead of the default dropdown menu which is also useful in the case of dynamically loaded scenes.

"create text"

This puzzle allows you to combine (concatenate) 2 or more pieces of text into a single line. If you provide non-textual values such as numbers, they will be automatically converted to text. Additional inputs are added by dragging an item block from the gray toolbox on the left into the join block.

Example: create an annotation composed of some text and the object name.

"append text"

This puzzle adds the given text to the specified variable.

Example: create an annotation composed of some text and the object name.

"replace"

This puzzle searches for the given piece of text and replaces it with the specified piece of text wherever it finds it (case-sensitive).

Examples:

"reverse"

This puzzle reverses the given piece of text.

Example:

"length"

This puzzle counts the number of characters in the specified text.

Example:

"is empty"

This puzzle checks whether the given text is empty (has length 0). The result is true if this is the case and false if not. For using with Logic puzzles.

Examples:

"find"

This puzzle can be used to check whether a piece of text is in another piece of text and, if so, where it appears. If the text was found, it returns its position (characters in text are indexed starting from 0). If the text was not found, the puzzle returns -1.

Examples:

"get letter"

This puzzle extracts the character from the specified position (characters in text are indexed starting from 0).

Examples:

"get region"

This puzzle allows a region of text between two specified positions to be extracted (characters in text are indexed starting from 0).

Example:

"adjust case"

This puzzle creates a version of the input text that is either UPPER CASE (all letters upper-case), lower case or Title Case (first letters upper-case, other letters lower-case). Non-alphabetic characters, and text in languages without case, such as Chinese, are not affected.

Example:

"trim spaces"

This puzzle can remove space characters from the beginning of the text, from the end of the text or from both sides of the text.

Example:

"count"

This puzzle counts how many times a piece of text appear in the specified text.

Example:

"convert to number"

This puzzle tries to convert the specified text to number, so that the obtained value can be used as input for numeric operations. If conversion fails, returns 0.

Examples:

"prompt"

This puzzle creates a pop-up window with an input field. The execution chain pauses until the user clicks OK or Cancel buttons, after which the puzzle returns the input value.

Example: