Forum rules - please read before posting.

Animation Question - Playing animation that adds to the character?

Hey everyone,

Just a quick animation question - what is the best way (or is there a way) to use the Character > Animate action to play an animation that adds to the character rather than replaces them?

Just to give you the context, I've basically got little emotion word bubble sprite animations - being word bubbles, though, I don't want them to actually replace the character sprite when I play them: Rather, I want them to pop in over the characters head.

I'm hoping there is another way of doing this besides having to create animations that are the entire charcter sprite *plus* the emotion animation above their heads...

Let me know if any of you have found a way to do this, thanks!

Comments

  • What's the animation engine?  Additive sprite animations are done by placing the animation on a new layer in your Mecanim Animator and setting the Blening Mode to Additive.

    You may be able to play it with the Sprites Unity engine, but you may have to switch to Sprites Unity Complex as it gives you far greater control over how the Animator is controlled - otherwise AC basically automates it for you.

    First though, I'd recommend getting it to work on a "dummy" Animator in a separate scene - without any of AC's components infuencing it.
  • Hey Chris,

    I'm in regular Sprites Unity, but I don't need any severe degree of control - I just need it to appear above the character sprite.

    That said, I've followed your directions for how to get it going in Sprites Unity and it doesn't seem to be jiving. Here's a gallery of what I'm assuming I should be doing:


    One thing that maybe I'm not understanding is the 'Mecanim layer' parameter. A/C wants me to enter a number for that, but the layer names are strings? Do I need to rename the layers numerically? I've tried it, but it doesn't seem to work...

    If anything jumps out at you, please let me know. It's pretty late in the game for me to switch to Sprites Unity Complex, but I guess I can always undertake the legwork of simply doing the animations with the idle character in the frame as well... Would simply be a lot more easy if I could get the additive method to work.

    Thanks!

    Also, I don't really know how to work an Animator without AC's components, but the animations themselves do work... I can get them to replace just fine, it's just the additive aspect that isn't working...
  • Your new Animator layer only has one animation in it - which means it's the default and will play automatically.  Try creating a "dummy" default animation by making an empty animation slot in there.

    Controlling Animators without AC can be done by using Mecanim parameters to control which animation is made active.  Sprites Unity Complex works by basically controlling those parameters, but you can test it out without AC by simply changing the parameter values while the game is running.
  • Still no luck on this, I'm afraid, though I'm actually not sure if it's AC's issue. For reference:


    I've put the blank / empty state in there as the default you indicate, but it still isn't making the animation appear. I know that it thinks it is running the animation, though, as the console doesn't throw any errors saying it can't find or can't play it.

    I also tried throwing in additional versions of the animations with directional suffixes and enabled that, just in case it was the issue. It wasn't.

    Finally, I tried to do it completely outside of A/C, as you said - I wasn't sure how to use parameters to trigger the animation, but as you can see I switched the default to my custom one while the game was playing, and you can see it running.

    For some reason, though, it just doesn't appear. I know that it isn't the animation itself, because if I put it on the top layer with override and trigger it, it *does* play - it just replaces my sprite instead of adds to it.

    It's just the additive aspect that seems to not work.

    Any other ideas...? Is this really only meant to work reliably in Sprites Unity Complex? I suppose it wouldn't be too much work to shift over...
  • edited February 2017
    It's certainly a Unity workflow issue rather than an AC one.  Until it works outside of A/C I don't see switching to SUC helping much.

    It could be that the layer has no weight.  Click the cog icon next to "Bubble Layer" and make sure its weight is set to 1.
  • edited February 2017
    Update! Your suggestion to make sure the additive layer had its weight set to 1 did have an effect: The bubble now appears.

    Unfortunately, it still isn't additive, and still erases the base layer sprite when it plays!

    Also, after it completes, it loops forever and cannot return to the regular Idle sprite - an error in the console informs me that it can't be found. I'm thinking that maybe this is because when it jumps to play the animation on another layer (1), it may not know to jump back to the original layer (0) from whence it came?

    Regardless, I think this has become more difficult than just dealing with it the long way around, so I'm going to skip the additive aspect and simply make the bubble animation with the character in it as well. These only play on player characters, and only when idle, and only in four directions, so for my purposes it isn't too bad... 

    My advice to anyone is just to make sure you've got a good PSD going with layers that will allow you to have characters and the various bubbles dip in and out to make it quick. That's what I'm setting up now.

    Thanks for trying to help me figure it out, though! Seems like maybe it just wasn't meant to be. I will give it another shot on my next game...
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.