Closed shinobirozs closed 3 years ago
As a work around, you can try calling the action to go to a position and set the position to the X and Y position of the object.
I think the ideal behaviour would be to stop the moving object in place when the "Pathfinding Behavior" is disabled and continue moving when it is enabled again.
After a quick glance on https://github.com/4ian/GDevelop/blob/master/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js I don't even see an onDeactivated
function. :confused:
When a behavior is disabled, doStepPreEvents
won't be called so, while I've not tested this recently, this should still work (i.e: disabling the behavior should disable the movement). Movement will still resume as soon as you enable again the behavior.
Thank you. I'll try using the workaround first. It would be great if we can use Stop object action in the future since it was the first action that comes to mind if we want to stop object movements.
Cheers!
Add this on the roadmap: https://trello.com/c/ABOAzUjj/326-add-action-for-stopping-objects-using-the-pathfinding-behavior
Hi,
I tried the work around by moving the character to the character's current position but it teleports it back to the original position as seen below. The workaround seems to not solve the issue. Thanks.
I tried to disable the Pathfinding behavior and it did stop the characters movement. I'll use this as a workaround for now. Thanks for your time.
Great that it's working with this - nice graphics by the way!
but it teleports it back to the original position as seen below
Indeed, that's a nasty bug! I fixed this for next version :) Can confirm that setting the destination to the object X;Y position will properly stop the object.
Describe the bug
There seems to be no way to stop a moving object with the Pathfinding behaviour.
To Reproduce
Steps to reproduce the behaviour:
Other details
Thank you.