Problem with variables and edit box

This forum is currently in read-only mode.
  • Hi i have one problem with variables and editbox.

    I need set variable in editbox and show variable from editbox to text. But it do not works. Please help me. I give here my cap file to check this file and help me.

    Really please.

    Cap file here:

    http://www.ourupload.xf.cz/soubory/3873/problem.rar

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Since you're doing this:

    + System: Always (every tick)
    -> Text: Set text to global('o')
    -> System: Set global variable 'o' to global('o')
    [/code:qxf2qowr]
    
    it can't really work. You're setting the text to the global variable 'o' and you're setting the global to it's own value, which naturally doesn't change anything.
    
    If you want to do what I assume, which is setting the global variable to the editbox text and then displaying that global variable with the text object, you need to set the global to Editbox.text. Also you should switch the order of the actions in that case. And if your global would be holding a string it's probably better to set its Type to TEXT instead of NUMBER.
    
    You could also just do this of course:
    
    [code:qxf2qowr]+ System: Always (every tick)
    -> Text: Set text to EditBox.text
    [/code:qxf2qowr]
    
    I guess there was some point in using the global.
  • Sorry my fail bad cap file

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