How do I pick random sprite out of 4?

0 favourites
  • 6 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • Hi! It has been a while since I played with Construct, so I ask for a bit of help here.

    Layout with 4 different sprites already present.

    How do I pick a random sprite from those 4? Then it has to do stuff and it gets destroyed. Then there's 3 left and I have to pick another randomly from those 3. And so on until the last one of those 4 has done it's part and is also destroyed.

    I tried to google this, also tried to search from manual and these forums and couldn't find a solution....

    Tagged:

  • Each time you can use 'pick a random instance' under system conditions

  • I tried that but they are not instances of a same sprite, they are 4 different sprites.

  • then put them in a family and pick a random family member.

  • I really don't know how to do that either. Most of what I remember and can do in C3 is pretty basic so I need some more assistance :(

    Layout 1:

    4 different sprites already on screen (so I don't spawn them since they are already there) . They all have automatic movement but are now disabled so they are still.

    When layout starts, random one of them must start it's movement. When it's done and destroyed, another random one out of 3 sprites still left, does the same. When all 4 are done and destroyed, it triggers a text or something.

    I just don't know how. I have tried everything I can, searched tutorials and demos but can't find anything that I could use...

    If anyone has a file that shows this or a tutorial online, I'd be so grateful.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure how it can be explained further. If you are using 4 different objects not instances then put them in a Family. Look up Family in the manual if you don't know how to create one. Then the logic is system pick a random instance of 'Family'.

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