Problems with showing text in my layouts

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

    I am new to C2 and I ran into a problem while learning things:

    I have three different layouts representing three planets in a far (far!) away galaxy...

    On game-start I show the layout of planet 1.

    There is an introductory text ("Welcome, etc") and two buttons leading to the other two planets.

    (Note: Clicking on the buttons represents kind of 'travelling' to the other planets.)

    Now, I click on e.g. the button for Planet 2 which takes me to the layout of that planet.

    Here are also two buttons to the other planets (1 and 3), etc.

    Now, and here comes the problem...

    When I click back on button 1 to return to Planet 1, I see the introduction text again, but I only want to show that once. (The first time you visit that planet.)

    What do I have to do to show the intro text only the FIRST time that I visit planet 1?

    And while we are at it; how do I show multiple lines of text after eachother? I only am able to show the last line with the code I came up with. This is what I have in the Event Sheet of Planet 1 right now:

    System->On start of layout -> T/Storytext -> set Visible

    Mouse-> On left button Clicked -> T/StoryText -> Set text to "Welcome to the Green Planet."

    Mouse-> On left button Clicked -> T/StoryText -> Set text to "To win this tutorial you blabla.."

    Mouse-> On Left button Clicked on Button1 -> System -> Go to Planet 2

    Thank you so much and enjoy the weekend!

    Rizzo

  • Create a global variable:

    When left btn clicked and Global Variable = 0 then show text "Welcome".

    When left btn clicked and Global Variable = 1 then show text "", or make text invisible or move it outside the layout.

    For making several lines of text, make the text field larger. If all text is on the same row, it will split auto on word.

    You can also make linebreaks Ex. "This is on first line" &newline &"This is on 2nd 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 for your reply Frosty elk! So, by using global variables the 'welcome'message won't appaear again the next time I visit the layout?

    Good to know, I'll look into that next!

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