Forum rules - please read before posting.

Sprites Unity: Why is the current animation played every frame?

I am trying to use a transition from my idle state to an idle_smoking state. Thus if the NPC is idle for the duration of "idle" then the player will start to smoke. This way when the player is talking he doesn't immediately go to start smoking again. The issue I have is that AC is constantly trying to run the animation that the character is on. So if the character is supposed to be idle the moment the transition goes to idle_smoking it gets set right back to idle and thus the player never smokes.

If I remove the idle animation from the NPC script then the character does not continue to talk between speeches because the talk animation is not set to loop. If I set the animation to loop then he keeps talking even on a single character speech action.

What is the reasoning behind constantly calling to animate the NPC besides calling it once and waiting for the next state to call for a different animation? If this were the case then we could use transitions. Am I missing something here?

Comments

  • So after some research I discovered that I should really be using Sprites Unity Complex which is able to use transitions and such. This setup is much better and I can see how it gives me much more flexibility in the future. 

    From my brief usage of it, it appears that Sprites Unity Complex is just Mecanim but with references to needed 2D variables.
  • Totally need to move myself over to SpritesUC.  Did you switch from legacy? If so, is it a lengthy process?
  • edited December 2014
    I switched from Sprites Unity to Sprites Unity Complex. So I was still using the Animator which is Mecanim, but AdventureCreator calls what animation to play. 

    Sprites Unity Complex has AdventureCreator set simple parameters for the specific animation controller. It is then up to you to create a state machine that references those parameters. I did find an issue that the Character:Animate action was not playing custom actions. Object:Animation did work, and I created another thread asking if this is a bug.

    It is a lengthy process if you have many characters that utilized the basic AC animations. That is idle, walk, run, talk. You will need to reference the appropriate parameters to essentially mimic what AC was doing for you. However I needed to switch as I needed more state machine functionality than Sprites Unity gives you. What is nice is you can switch on a per NPC/Player basis. Its not like everything needs to be setup in one way. I am currently using Sprites Unity until I find a need for that specific NPC/Player to have more complex animation interactions. Then I switch to Complex just for that NPC/Player.
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.