Hiya, I've been trying out 2.5+, especially using child events.
It worked pretty well so far, until I ran into this curious case. Here's a sample mfa for you to try out that reproduces the case I've had on my project.
We have characters separated in three objects : the "Character" (red) itself that moves on the screen, the "Character Values" (blue) which is hidden contain all sorts of constant values specific to that character, and the "Character Input" (green) which is just an interface between keyboard presses and the actions the character should do.
For a given character, these 3 objects are linked together according to the ID given in the first alterable value. Then depending on which key you're pressing, either character will move left or right.
The following code works properly :
Note that the deceleration code at lines 28 and 29 share the two same first conditions, so we might as well merge these events and add another nesting layer, which become lines 18-19-20 here:
But, turns out this doesn't work. If you try the sample game and press G to use the nested lines, you'll notice something is going wrong with that event. It seems like the other character is causing the deceleration to take place despite defining the object scope in line 15.
To investigate more, I added some debug actions to confirm which IDs were being used in the deceleration event (see second frame of example mfa) :
But now, everything works! Events are still nested in the same way, the only new things are the debug actions, but now both characters seem to move properly. Am I missing something here? Why wouldn't the second case work, and why would the third case fix it?
Thank you and have a nice day!