I love it! ![]()
I’ve had a bug in my project for a long time that only happens sometimes. I looked at my events and couldn’t find anything wrong.
I just used the gameplay test and it found a possible cause, ran multiple tests to check, applied the fix, ran more tests and then reported back it was solved. Amazing.
Please note, one part of it was in french: SourisSurObjet(ClickableObject)
Also, at the end of it I wasn’t sure what had actually happened, that is, did it apply the fix and change my events. I had a look at the events and the change seemed to be there so I asked the ai to make sure and yes it had made the change to my events. My feedback for this is it would be great if it had a before and after view of the events in the test page. That would make it easier to learn from and to be sure of what my actual problematic events were.
Here is the summary of the diagnosis to show that it only happened sometimes and thus was difficult for me to work out the problem and how happy I am that it’s now solved.
Found and fixed the bug. Here’s what was happening:
The cause — In the group
Drag clickable object, the release event (event-11.9) only resetDragged = Falsewhen the cursor was over the object at the exact moment the mouse was released:
if SourisSurObjet(ClickableObject) and MouseButtonFromTextReleased("Left") and onceIf the cursor wasn’t over the object in that release frame (the object had jumped out from under it, or the cursor landed over a different clickable in the group, which then got reset instead of the dragged one), the event never fired — so
Draggedstayedtrueand the object kept following the cursor.