Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent follower movement during applymovement #5346

Open
Kasenn opened this issue Sep 8, 2024 · 1 comment
Open

Inconsistent follower movement during applymovement #5346

Kasenn opened this issue Sep 8, 2024 · 1 comment
Labels
bug Bug status: unconfirmed This bug has not been reproduced yet

Comments

@Kasenn
Copy link

Kasenn commented Sep 8, 2024

Description

Follower movement is very inconsistent when using applymovement OBJ_EVENT_ID_PLAYER with the flag FLAG_SAFE_FOLLOWER_MOVEMENT set. about 90% of the time the follower will just sit still (even going as far as freezing the sprite bobbing) while the rest of the time it moves with the player as if the player was moving manually.

Based on testing, the follower seems to move properly when the script is activated through a trigger, but not through anything else (signs, interacting with objects, ON_FRAME_TABLE mapscript, debug menu script).

Version

1.9.1 (Latest release)

Upcoming/master Version

No response

Discord contact info

No response

@Kasenn Kasenn added bug Bug status: unconfirmed This bug has not been reproduced yet labels Sep 8, 2024
@Kasenn
Copy link
Author

Kasenn commented Oct 8, 2024

After doing some tests, it seems that the inconsistent behavior is based on how playerCopyableMovement is set. This is normally handled by player input, but since applymovement does not directly read any inputs, the playerCopyableMovement remains the same through the movement as it was before the movement started.

Hence, since the player has to walk on to a trigger event to trigger it, the follower works correctly, as the playerCopyableMovement remains at COPY_MOVE_WALK. However, since the applymovement does not directly alter the playerCopyableMovement, it's possible to get different results on the follower movement when interacting with objects based on whether or not a movement is still in progress when the object is interacted with. You can see in the included video how the follower reacts completely differently based on whether the player is standing still or walking when interacting with an object

followermovement2.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug status: unconfirmed This bug has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant