can a custom particle system use random sprites from family?

0 favourites
  • 3 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • I just learned about families and how they can be used to simplify event sheets by grouping objects

    I was wondering if it's possible to generate a custom sprite system which draws sprites at random from a family? for example: a sprite particle system to simulate guts flying when enemies are destroyed, with the images taken at random from a bunch of different ones in a same family: skulls, blood splats, chunks, etc?

    or could a sprite particle system generate sprites from different frames in an animation? like one frame is a skull, another one is an arm, another a leg, etc.

    this is because i am trying to make particles seem more organic and seemingly aleatory not only when it comes to direction, size, etc, but also so it's not always the same images being used

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you create a family instance, a random family member (random sprite) will be created. So yes, to make custom particles, you can add all those arms and legs to a family, add Bullet and Fade behavior. When an enemy is killed, create a bunch of family instances, set random angles and speed etc.

    Though it may be easier to have all these body parts in one sprite as different frames. Then when you create a new sprite instance, simply set animation frame to floor(random(Sprite.animationFrameCount))

  • yeah the second option sounds like a lot less hassle

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