Thank you for reading my question, every answer will be highly appreciated!!
Until now I have this code, but it keeps giving me errors and I’m stuck here.
This is to play an animation according to the action performed by the player
Check if the player is crouching and play the crouch cinematic
IsCrouching := FortCharacter.IsCrouching[]
if (IsCrouching)
{
# Handle crouching logic when it's true
CrouchCinematic.Play()
}
else
{
# Handle non-crouching logic when it's false
CrouchCinematic.Stop()
}
# Check if the player is walking or running and play the corresponding cinematic
if (IsSprintingTuple(1)?):
RunCinematic.Play()
else:
WalkCinematic.Play()
# Check if the player is jumping and play the jump cinematic
IsJumpingEvent := FortCharacter.JumpedEvent().Await()
if (IsJumpingEvent(1)?):
JumpCinematic.Play()
else:
JumpCinematic.Stop()
# Check if the player is idle and play the idle cinematic
if (not IsSprintingTuple(1)? and not IsJumpingEvent(1)? and not IsCrouching(1)):
IdleCinematic.Play()
else:
IdleCinematic.Stop()