How do I load sprite animation frames at runtime?

0 favourites
  • 3 posts
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • Hello everyone,

    I'm looking for a way to apply new images to a sprite, to all its animations, to all its frames.

    Basically a way to replace the graphic of a sprite entirely and achieve a generic sprite able to load any content.

    I will explain this better with an example...

    Let's say I have 5 enemy types. They can all do exactly the same actions: shoot, explode, fly, etc. (each action is an animation)

    I would then tell C2 to create a sprite/object of type "generic enemy" and set all the properties (images, speed, health, damage, etc) by XML.

    A single sprite therefore is doing the common jobs requested to all the enemies and, since the animations are common, I can still tell C2 to start an animation and listen for its completion and I can control all enemies writing 1 event sheet instead of 5 :)

    In C++ I would say I'm creating a base class, but I can't figure out the way to achieve such result in C2.

    Thanks for your help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's what Families give you.

  • Awesome! That's exactly what I was searching

    Thank you

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