I have a BBCode called AutoFire that displays AUTO FIRE in the top-left in blue.
When I click on AUTO FIRE it goes a brighter colour. This is what I want.
Unfortunately, when I press the Enter key, it does not go a bright colour. The colour does not change. Why not?
I added a DebugText object to display AutoFire is ON or AutoFire is OFF in the middle of the screen so that I could see in both cases the variable was changing fine, so I’m confused why the BBCode colour change only occurs on the mouse click and not when Enter is pressed?
I’ve uploaded a simple game.json that demonstrates the problem: https://www.sendspace.com/file/qh6fzh. Try clicking on the text in the top-left vs. hitting the Enter key. This seems broken on GDevelop 5.0.0-beta105 on Windows 10.
I guess the code says he needs put the mouse over the text and press, and at the same time hit Enter key for the code works and change the text color. Only this way all conditions would be true.
Or I am wrong?
I think perhaps I didn’t explain the problem clearly enough.
The scene variable AutoFireOn always changes. That works fine. If I click the AutoFire text object, or if I press Enter, both are fine, the variable AutoFireOn will change as expected as you see the DebugText change from AutoFire is ON to AutoFire is OFF. That works fine.
The problem is that the Set base color of AutoFire only works if I click on the AutoFire text object. Set base color of AutoFire is not working if I press the Enter key.
So it can’t be to do with the conditional logic, or where I place the Trigger once or how many of those I place, otherwise the scene variable would not change either. And I have tried all of the suggestions made in this thread, but nothing has made any difference.
It doesn’t make sense to me. How is this even possible?
(btw the link to game.json I provided above seems to work fine for me?)
Good suggestion, I checked in debug mode but no, there is only one instance of AutoFire.
I think the problem is a bit more weird than that, it’s another strange bug, because if I separate out the Return key is pressed action below repeating all the same stuff, it works fine:
I remember a very old threat. It has to do with how it works internally
and yes it’s confusing. I don’t know what the exact explanation and solution was, but I just figured out a simple one.