What it does
TextCharX takes iTextIndex (an integer) and iCharIndex (an integer), and answers a float. That is the first of 2 forms. iTextIndex is the id of a Text object, the one CreateText returned: it is how the call knows what to act on.
Syntax
1
TextCharX(iTextIndex integer, iCharIndex integer) → float2
TextCharX(iTextIndex integer, iCharIndex integer, x float)Parameters
| Name | Type | In forms |
|---|---|---|
| iTextIndex | integer | all |
| iCharIndex | integer | all |
| x | float | 2 |
What each form returns
| 1 | TextCharX(text, char) | float |
| 2 | TextCharX(text, char, 100.0) | nothing |
Example · generated
Form 1, the command hands back the id
text = CreateText("hello")char = CreateTweenChar(1.0)DO Print(TextCharX(text, char)) Sync()LOOPForm 2, you choose the id yourself
text = CreateText("hello")char = CreateTweenChar(1.0)TextCharX(text, char, 100.0)DO Sync()LOOPCreateText and CreateTweenChar are there to give the call something to act on; TextCharX is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.