I'm apparently creating a text box, but I can't find the code! (SOLVED BY CHATGPT!)

0 favourites
  • 2 posts
From the Asset Store
Over 2700 files with all the colour combinations from a 15 colours palette!
  • I recently picked up an old game to finish it -- but I'm having trouble with one of my text boxes.

    After my game is over I add up the player's score in big numbers at the bottom of the screen. I wanted to change the size and color of the text, but when I clicked on the text box object most of the properties were missing.

    That puzzled me, but then I thought, "Oh, the text box must not exist in my layout. I apparently create it in code!"

    Here's the problem. I have searched ALL of my code and I am not creating that text box anywhere. What's going on? What am I missing? Been trying to figure this out since yesterday...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right after I posted my question I thought, "Hmm. I wonder if chatGPT knows anything about Construct 3? Maybe I should ask the AI my question!"

    Here's the response from GPT 4.0:

    It sounds like you're having trouble locating the properties of a text box in your Construct 3 project. Here are a few suggestions to help you find and modify the text box properties:

    1. Make sure the text box is selected: In the Layout view, click on the txt_final_score text box to ensure it's selected. If it's not visible in the Layout view, double-check your layers and make sure the layer containing the text box is visible and unlocked.

    2. Check the Object Types: Go to the Project Bar (on the right side by default) and look for the "Object Types" folder. If you don't see the text object called "txt_final_score," it's possible that it was accidentally deleted or renamed. In this case, you'll need to recreate the text object and assign the correct properties.

    3. Verify the object type: Ensure that the txt_final_score object is a "Text" object and not a different type, such as "SpriteFont" or "TextBox." The properties you're looking for, like font color and size, are specific to Text objects. If your object is a different type, you'll need to replace it with a Text object.

    4. Inspect the Event Sheet: If you still can't locate the text box, it might be created dynamically through an event in the Event Sheet. Look for events that create or modify text objects, specifically targeting "txt_final_score." It's possible that the text box is being created on a specific condition or layer that's not currently active.

    5. Verify the active layout: Make sure you're working in the correct layout. Construct 3 projects can have multiple layouts, and it's possible that the txt_final_score object is in a different layout than the one you're currently viewing.

    If you've tried all these steps and still can't find the properties for your text box, consider posting your issue on the Construct 3 forum or reaching out to the Construct community for assistance. There might be a specific issue in your project that requires a closer look.

    Friggin' amazing! And sure enough, the very first point fixed my problem! (I had my text box on a layer that wasn't visible or unlocked. Forgot about that!)

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