Text Puzzles

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

Text visual programming blocks

Contents

Puzzles Reference

text

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

Visual programming block to create text value

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.

Text block example

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.

Using text blocks instead of selector blocks

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.

Using text blocks instead for dropdowns

text multi-line

This puzzle provides the means to supply some text to your Puzzles scenario. The puzzle uses Ace Editor for displaying and editing the content. See the relevant keyboard shortcuts here: Default Keyboard Shortcuts.

The puzzle supports CSS, HTML, Javascript and plain text highlighting modes, which can be switched on the fly. The puzzle can be resized to change the editor's width and height.

Visual programming block to create multiline text

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.

Visual logic block to concatenate text scrings

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

Concatenate example

append text

This puzzle adds the given text to the specified variable.

Block to append text value to a variable

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

Append text block example

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).

Visual logic block to replace text

Examples:

Replace text example script

reverse

This puzzle reverses the given piece of text.

Visual logic block to reverse text

Example:

Reversing text example

length

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

Visual programming block to calculate string length

Example:

String length 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.

Visual coding block to check if string is empty

Examples:

Checking if string is empty

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.

Visual logic block to find values in string

Examples:

Searching for substing

get letter

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

Get letter visual programming block

Examples:

Getting string letter

get region

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

Get region visual programming block

Example:

Getting text region 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.

Visual logic block to adjust text case

Example:

Using adjust case block

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.

Trimming text spaces with visual programming

Example:

Trimming text example

count

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

Count visual logic block

Example:

Count visual logic block example

new line

A newline character (also called "end of line" or "line break" character). Use this character inside the create text or append text puzzles to create multiline texts.

New line visual programming block

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.

Convert text to number with visual programming

Examples:

Text to number example script

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.

Prompt user for text visual logic block

Example:

Prompt example script

Having Troubles with Puzzles?

Seek help on the forums!