simple text box issue

0 favourites
  • 5 posts
From the Asset Store
Over 2700 files with all the colour combinations from a 15 colours palette!
  • So i've tried to show a variable in a textbox. Simple thing.

    This example (https://www.scirra.com/tutorials/257/lets-make-a-calculator ; the first one that poped on google) shows many things not related, but it does eventually explain how to do so.

    <font color=blue>"Add an event-> On start of layout -> Action -> TextBox -> Set Text -> textbox.

    If you run your project, you'll see the textbox with a 0 there. It's working. :)"</font>

    But for me this is not working. If I enter only the name of a global variable, nothing shows up in the text box. Even in the the calculator example, if I run it as it is, nothing shows up in the text area.

    I've found a way around, it's to enter ""&variable in the text feild. But is it suppose to be like that ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are two text options (that I know of) in C2. one is the general text (ie display some text) and the other is the form control text box.(ie user can enter text here)

    If you use the general text display then you can do as you say above but (I guess) because the form control is waiting for some text you don't appear to be able to - except with the "" &variable .

    have a quick look at:

    text box example

  • You can use str function.

    TextBox -> Set Text -> str(VariableName)

  • Ooookay. So i've been using the wrong kind of object all time. Tanks a lot, i was really starting to think something was wrong with my PC.

  • Get gud

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