TextBox bug after condition 'text changed' nothing happen

0 favourites
  • 14 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • hello i try simple experiment with textbox (and advanced textbox too) plugin

    I add text box object, audio object and add sound to blank layout

    In event sheet:

    every 1 second set text to choose("K" , "L")

    Condition:

    when textbox 'on text changed' play sound

    I run preview and every 1 second text is changed but without sound

    i cannot run events in my game because of that

  • I thought on changed is only triggered when the user types something in the textbox. If it would be triggered every time the text is set then we'd run into other issues such as an infinite loop if we made a condition like:

    on text changed

    --- set text to ""

  • I thought on changed is only triggered when the user types something in the textbox. If it would be triggered every time the text is set then we'd run into other issues such as an infinite loop if we made a condition like:

    on text changed

    --- set text to ""

    Well condition is 'on changed' not 'when typed' soo

    I try that now,

    I use to rescue this bug Rexrainbow 'simulate KeyEvent' that dont help too

  • under on text changed condition and Play sound, i put set text to "P" and dont work too

  • Ashley i think its not possible to repair this via events. Can you look at this issue and fix this? Will be great because this bug is blocking my path to develop further

    thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As per the manual:

    "On text changed

    Triggered whenever the text in the field is modified, by typing, backspace/delete, cut/paste etc."

    You have to manually change it by adding input, like R0J0hound said. It's not intended to work if you are simply setting text via events.

    You can probably get around that by updating a variable along with setting the textbox text, and then play the sound when the variable changes.

  • As per the manual:

    "On text changed

    Triggered whenever the text in the field is modified, by typing, backspace/delete, cut/paste etc."

    You have to manually change it by adding input, like R0J0hound said. It's not intended to work if you are simply setting text via events.

    You can probably get around that by updating a variable along with setting the textbox text, and then play the sound when the variable changes.

    Thats easy to say when you see simple capx example

    hard to implement in ready project

    If you know how do it without manually typing im rescued

  • You can't, not with the textbox object. You could search for a plugin that might be able to do it.

  • You can't, not with the textbox object. You could search for a plugin that might be able to do it.

    ok but no idea which other plugin?

  • Nope, I have no idea if there even IS a plugin. To be honest it's a bad idea to do what you're trying to do, which is why the textbox is set up not to let you do it in the first place, so I'm not sure that anyone has ever made a plugin like that or not.

  • ok thanks, i trying 1 hour change all events from text to global variable but no good result

  • You can either duplicate the play sound action to every place you set the text:

    every 1 second

    --- set text

    --- play sound

    or you could make a function to set the text and only use that:

    every 1 second

    --- function call "set text" ("foo")

    on function "set text"

    --- set text to function.param(0)

    --- play sound

  • I am finding that I cannot change the textbox to a variable. Attempting to just makes it blank.

  • You can either duplicate the play sound action to every place you set the text:

    every 1 second

    --- set text

    --- play sound

    or you could make a function to set the text and only use that:

    every 1 second

    --- function call "set text" ("foo")

    on function "set text"

    --- set text to function.param(0)

    --- play sound

    Rojo I appreciate you try to help but i need to see this on capx example

    but before you decide to do that

    this is better example

    i make two way to change text but only one works

    https://dl.dropboxusercontent.com/u/447 ... xtbox.capx

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