TextBox bug after condition 'text changed' nothing happen

Discussion and feedback on Construct 2

Post » Mon Jan 23, 2017 7:19 pm

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
Last edited by delgado on Wed Jan 25, 2017 1:11 am, edited 2 times in total.
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Mon Jan 23, 2017 7:23 pm

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 ""
B
91
S
31
G
102
Posts: 5,232
Reputation: 67,250

Post » Mon Jan 23, 2017 7:25 pm

R0J0hound wrote: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
Last edited by delgado on Mon Jan 23, 2017 7:32 pm, edited 1 time in total.
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Mon Jan 23, 2017 7:28 pm

under on text changed condition and Play sound, i put set text to "P" and dont work too
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Mon Jan 23, 2017 7:47 pm

@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
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Mon Jan 23, 2017 8:03 pm

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.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Mon Jan 23, 2017 8:15 pm

Burvey wrote: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
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Mon Jan 23, 2017 8:39 pm

You can't, not with the textbox object. You could search for a plugin that might be able to do it.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Mon Jan 23, 2017 8:40 pm

Burvey wrote: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?
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Mon Jan 23, 2017 8:42 pm

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.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 0 guests