TextCharX

Famille: Text · 2 formes

Ce que fait la commande

TextCharX prend iTextIndex (un entier) et iCharIndex (un entier), et rend un flottant. C'est la première de 2 formes. iTextIndex est l'identifiant d'un objet Text, celui que CreateText a rendu : c'est ainsi que l'appel sait sur quoi agir.

Syntaxe

1
TextCharX(iTextIndex integer, iCharIndex integer) → float
2
TextCharX(iTextIndex integer, iCharIndex integer, x float)

Paramètres

NomTypeDans les formes
iTextIndexintegertoutes
iCharIndexintegertoutes
xfloat2

Ce que rend chaque forme

1TextCharX(text, char)float
2TextCharX(text, char, 100.0)rien

Exemple · engendré

Forme 1 : la commande rend l'identifiant

text = CreateText("hello")char = CreateTweenChar(1.0)DO  Print(TextCharX(text, char))  Sync()LOOP

Forme 2 : vous choisissez l'identifiant

text = CreateText("hello")char = CreateTweenChar(1.0)TextCharX(text, char, 100.0)DO  Sync()LOOP

CreateText et CreateTweenChar sont là pour donner à l'appel quelque chose sur quoi agir : TextCharX est la ligne qui compte. La boucle DO … LOOP n'est pas décorative : un programme BASIC classique s'arrête dès qu'il n'a plus de lignes, et c'est Sync() qui dessine l'image.

68 commandes dans Text