Move Player to Marker - Cancelable no longer works

markusrgb 4 months ago in Game Creator updated 3 months ago 7

Move Player to Marker - Cancelable no longer works

In early GC versions this still worked.

With old markers and a move commandI created earlier, the abort still works.

But if I create new markers and a move command, the cancel function does not work anymore.

Unity version:
Game Creator version:
Under review

Seems to work fine on my end. I don't think newly created markers have anything to do with not being able to cancel. A marker is a very simple object that has a position and a direction. Can you make sure these Markers exist or try to simplify the scene? Maybe the problem is somewhere else.

The problem is not the marker!

As I have already described, the "Move to" function has an error.

The marker is present and is also recognized. Finally, the player also moves in the direction of the marker.

Only cancelling the movement does not work anymore!

Strangely enough, this only affects the new "move to" commands that I create.

The "move to" commands I created earlier still work fine. Only the newly created ones have an error.

I have already tested this on simple objects like a cube, otherwise I would not write an article here.

That's what I meant. There's no reason why newly created Actions should work differently than previously created. Have you tried reproducing this in a new scene? It could be that you're constantly calling the Move Character To action and thus, the character is constantly told to move to a destination.

Okay, I found the problem. And this knowledge strengthens my opinion that this is a bug. if i have "move to" alone in an action everything works without problems. but as soon as i have another command before the "move to" in the same action the error occurs. a simple "debug log" before the "move to" command is enough to generate the error. if i write the debug command after it the "move to" function cancels without problems. see my attached photos above.


I've managed to reproduce this with what you said and indeed, it's a bug that will be addressed in the next update. Just so you don't have to wait for it, I'm attaching the patch below these lines:


I haven't fully tested the extend of the error, but everything seems to indicate that, when early-exiting an Action (for example, when cancelling the movement), we jump to the last instruction of the Actions using a very big number. However, integer's sign is defined by the first bit of the binary representation. When we used this big number to skip all the other instructions, we used the biggest number available. But the binary's biggest number is negative, because the first bit is 1. The system was instructed to jump to position -9999999.. which was capped to 0, thus resulting in the re-execution of the entire Actions list.


Hi, I've just fixed this issue for the next release, so I'm marking this as complete. If after the update you still experience any issues, feel free to continue the discussion below.

Thanks Marti :)