Creating a family and picking a random object from within

0 favourites
  • 4 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Hi,

    Its been a while since I used Construct 2 and am I trying to remember how I have a set of sprites where the enemy can randomly target one .

    I first tried copy and paste these sprites however when I change the animation it changes them all.

    I then cloned them and put them in a family - again once I set the choose a random instance I am struggling to only pick one of these sprites to change their status and/or animation.

    TIA

    TimCS

  • When you say 'set the choose a random instance' did you use system pick a random instance? That should work, though make sure it is only triggering once and not all the time or it will look like it's picking all of them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks lionz During the course of the game I am trying to find the best way of getting a random instance picked again - at the moment I use a function which is called at the start of the layout, however this is being called "every tick" which now see is why it picks them all as like you said call it once.

    So with that in mind I need to find a way of calling it again (the function that is) every so often like another random call for example

    Thanks

    Tim

  • On start of layout should be a trigger once so should only run it one time so you must be doing something else wrong there. You decide when you want to call the function, pick a condition that will only run once.

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