Well, a good nights sleep seems to have helped - I figured out the issue - Seems that the Trigger Once condition was fouling things up - still don’t understand why it worked but only in a specific sequence, but removing all of the Trigger Once conditions seems to have helped.
I’m still interested to know if there is a better way of writing this logic. Any assistance would be greatly appreciated!.
Hey folks, I must be missing something, but this simple color change project isn’t working properly and it is driving me nuts.
What is is supposed to do:
- display 3 colored blocks on the screen (red, green, blue)
- user clicks on any block, that block turns black
- if another block was already black, it is changed back to it’s original color
- the order or sequence you click on the blocks is irrelevant
What IS happening:
- First click after launch - any block clicked turns black
- subsequent clicks after launch (click 2+)
If you click on red it will always turn black
If you click once on green, it will only turn black if the prior block clicked was blue (except for the first click after launch) - if you click 2x on green it will turn black
If you click once on blue, it will never turn black (except for the first click after launch) - if you click 2x on blue it will turn black
I have added a text block and actions to show currentSelect and priorSelect values to try and understand why it is doing what it is doing, but the values say it should be working.
Before you say that the order of the events makes a difference, the original order was Red, Green, Blue. Changing the order to Blue, Green, Red made no difference.
Second question - is there a better way of handling the “what is is supposed to do” scenario?
I only been working with Gdevelop for about 8 hours so far and I like it, but little things like lack of a flow trace is making debugging difficult.
I put the project in a .ZIP on my website if you want to look at it.