Sub-animations?

This forum is currently in read-only mode.
From the Asset Store
4 Block Soldiers with different animations, 400x400
  • Sorry for flooding Help/Tech Support with questions, but the wiki and other documentation really isn't enough quite yet...

    Can someone explain Sub-Animations? It seems like it would be very helpful for what I want, but I'm missing a bit of syntax.

    I want to have an event trigger if any one of a particular set of animations is playing. So, I figure that it would work by making all those animations a subanimation. So I create a new animation with nothing in it. I then move all the animations I want grouped as subs of that first one.

    Suddenly, I can no longer get these animations to play. I assume there's a separate syntax for accessing subanimations, but I can't figure out what it might be...

    While I'm at it, will testing for the root animation playing also trigger if a subanimation is playing?

  • [quote:112lbqv4]Suddenly, I can no longer get these animations to play. I assume there's a separate syntax for accessing subanimations, but I can't figure out what it might be...

    The auto-naming sequence is usually "Default", "Animation 1", "Animation 2", etc.

    MouseKeyboard: 113 On Left Clicked on Sprite 0 
    

    SpriteSet animation to "Animation 1"[/code:112lbqv4]

    Just to clarify YourspriteSet might look better, there's no inheritance.

  • But I haven't changed the names of any of the animations, I just took formerly main animations and moved them to a sub-animation position. If you could access a subanimation with just the name of the subanimation, doing this should not have changed the behavior of the game whatsoever. So why did it break?

    Also of note, once I moved an animation to a sub animation, I can't seem to be able to move them back to normal main animation status. At least not by dragging it.

  • Yeah, it looks like a bug that you can't drag a subanimation back out. Submit it to the tracker.

    I'm still debating if sub-animations were a good idea to implement. It's tempting just to turn them off. There's a vague case for having them for two reasons:

    • Organising animations
    • Having more complex animation structures, like "Stopped" and "Walking" animations, then subanimations for carrying different weapons/wearing different clothes/whatever. So you'd have subanimations under "Walking" like "Walking with nothing", "Walking with sword", "Walking with shield", "Walking with sword and shield". But I think this could be better done with separate sprites for the different things, and just have one generic walking animation.

    What do you think? Should we have sub-animations? People often ask what they are for (and the above two things are the only thing), so I guess it isn't intuitively obvious.

  • Perhaps subanimations could in fact act like families for animations, like I initially thought?

    And again, why did my game break when I moved the animations to be subs?

    Also: Reported.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Please leave them in!

    It sooo much easier to manage sprites as animations.

    Example in my game Im changing buttons with it, and then I have an upgrade feature for my tanks.

    Its much easier to change the animation than to destroy a sprite, then create another, and transfer all its variables.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)