Need Help with TextBox Quickly

0 favourites
  • 9 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hi guys i got a huge problem. I'm doing a game like RPG but is like a question and answer game. The problem is that i need to get the text from the text Box for that i use an instance variable called Valor in the same Text Box called Respuesta. So i set the value from Valor with the expression Respuesta.Text it should work but it doesn't i tried to set some random Text in the value and it worked could u guys help me? down here is an image so u can be lost

    Ahora

    imageshack.com

    Antes

    imageshack.com

  • I'm not sure I follow your problem exactly, but you may need to include "str(your words here)" in the event to get a good result.

    Can you post a capx otherwise?

    ~Sol

  • i could but the game is in spanish i i put the image link's i and here is the capx

    mediafire.com

  • did you see it? the problem is in event sheet 3

  • i try what you said but it seems it doesn't workby the way i'm looking the result in a Text

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm new to this, and not 100% sure I'm tracking your issue. Shouldn't your final line be Text -> set text to Valor

    Your current code looks like it's setting it to the Respuesta.valor (which is your textbox.Var).

  • Well the idea is to first get the value from the TextBox then called it with Respuesta.Valor so i can see if i capture the value, the strange thing is when i put a random text into the value directly in the code i mean for example

    Set Valor to "Random"

    The Text below show Random too but if i use the var it didn't work

  • The problem you have comes from the fact that you have 2 Respuesta object on your layout: the one you placed at edit time, and the one you create on collision with Aciano.

    As there's no way to know which one to pick, c2 pick the first one.

    The solution:

    on start of layout -> Respuesta: Destroy

  • thank you i will test it

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