Show list of text with format

0 favourites
  • 6 posts
From the Asset Store
OpenAI TTS
$9 USD
10% off
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • Hi

    I�m trying to make a list of objects that you must find in the game. I though that text will be enough and i avoid the use of many images.

    So i have a sprite of a pencil and a bucket, each one with a variable name for example.

    I can make a loop and record that names in an array using families.

    But i don�t know how to show the list afterwards.

    I created a text object and i wrote the array(0) + " " + array(1), but all in a line. Can i introduce a break line or width atribute, or write html maybe?

    Then I tried to create a Text object for each line, line0, line1, .... But i dont know how to make a loop that changes the object name. For example:

    for i,1,numobjects

    text&i.text=array(i)

    The objective is a list like:

    pencil

    bucket

    Thank you

  • Excuse me.

    Searching in the forum finally i found the sintaxis:

    Array: For Each element

    -> Text: Set text to Text.Text&NewLine&Array (Array.CurrentX)

    It was simple but until now i was not able to find it.

    Thanks to all for this great forum

  • I�m still searching how to give format to the line (not only text) but as soon as i locate it i will link it here

    Thanks

  • You can format the whole text object but not just lines of it. To have different formatting per line create a different text instance per line.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you. I was still searching.

    I can�t create an array or dictionary of Sprites also. And i don�t know how to make a loop through Sprite names something0, something1, something2,...

    So I think the solution is to create a family and loop through all objects in it, setting text to a variable value inside the text object.

    Let�s try then :)

    Thank you very much

  • I finally found this

    scirra.com/forum/plugins-pode-html-pack_topic51522_post324677.html

    which lets me add CSS styles.

    Thank you very much again for this great community

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)