Jump to content

[HELP] Post-animation running is messed up


Dmitrijs

Recommended Posts

Good morning/afternoon/evening,

I have stumbled across a quite annoying problem with animations and, sadly, reviewing many animation-related topics did not lead me to solving the problem.

Goal is simple: force a "talking" animation upon player when he says something in the chat and make him able to move during the animation.

The issue is that the player, who was previously affected by an animation, keeps running with his arms down below. The issue seems to stick unless a player/ped performs any kind of action - punching, jumping, shooting e.t.c. [video linked below in a spoiler]

Topics that covered some kind of animation freezing issues were usually solved by a) using setTimer() and nullifying the animation with setPedAnimation(ped) function combination or b) making an animation stalemate [by setting freezeLastFrame to false]; however, both of those methods are dissatisfying.

If someone has stumbled across anything similar, any kind of advice will be of much help! Thanks in advance!

 

Code that displays the issue:

addEventHandler ( "onPlayerChat", root, function ( message, mType )
      if ( mType == 0 ) then
          --[[ .. some code .. ]]--
           if not isPedInVehicle(source) then
              setPedAnimation (source, "ped", "IDLE_CHAT", 0, false, true, true, true)	
           end
      elseif ( mType == 1 ) then
          --[[ .. some code .. ]]--
      end
end
)

Video example:

Spoiler

 

 

 

Edited by Dmitrijs
Link to comment
13 hours ago, Dmitrijs said:

Goal is simple: force a "talking" animation upon player when he says something in the chat and make him able to move during the animation.

It's not possible in MTA. You can only play one animation at a time using setPedAnimation. However, you can create your own animation in 3DS max and make the player talk and move at the same time in that animation.

Link to comment
24 minutes ago, Saml1er said:

It's not possible in MTA. You can only play one animation at a time using setPedAnimation. However, you can create your own animation in 3DS max and make the player talk and move at the same time in that animation.

I see, thanks for advice! Will try to do that as well as trying to alter the goal a little so it becomes scriptable.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...