Forum rules - please read before posting.

Direct movement: entering Cutscene state cancels Player custom animation started on the first frame

AC 1.86.7, Sprites Unity animation engine, Movement method: Direct.

This is a regression in 1.86.7: PlayerMovement.OnEnterGameState doesn't exist in 1.86.5. It appears to come with the fix "Direct-controlled Players sometimes incorrectly turning during cutscenes". In 1.86.5 the same setup works correctly.

Repro:

  • Set Movement method to Direct.
  • Create a Hotspot whose Use interaction is a "Pause gameplay" ActionList with, as its first Action, Character: Animate → Player → Play custom → a non-looping clip, Wait until finish = true, followed by e.g. Engine: Wait 1s.
  • In Play mode, stand still and use the Hotspot.

Expected: the clip plays fully before the next Action. Actual: the clip is cut off after 1–2 frames and the next Action runs at once. With Point And Click it works correctly.

Cause: the Action sets charState = Custom on the frame the ActionList starts. On the next frame StateHandler enters GameState.Cutscene, and PlayerMovement.OnEnterGameState sets charState = CharState.Decelerate, because its check charState != CharState.Move also matches Custom. The character returns to idle, the Animator leaves the clip's state, and AnimEngine_SpritesUnity.ActionCharAnimRun treats the clip as finished.

Suggested fix (PlayerMovement.OnEnterGameState):

if (KickStarter.player.charState != CharState.Move && KickStarter.player.charState != CharState.Custom && KickStarter.playerInteraction.GetHotspotMovingTo() == null && !KickStarter.player.IsPathfinding())

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.