How do I choose between 2 frames?

0 favourites
  • 2 posts
  • Hello everyone,

    Im having a small issue! im currently using:

    Every 2 seconds -> Set animation frame to: choose(0,1)

    So that it chooses a random frame when the object is created.

    But my problem is, i want to restrict it, so that it will not choose the same frame more than 3 times in a row.

    How would i do that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can "Pick Nth instance" in the System conditions.

    Then use object.Count-4 as the Nth instance to check the frame.

    Do the same for object.Count-3 and object.Count-2

    If all have same frame as the new object, then change it to something different.

    Something like that. This is one way to do it. You can also use a variable to count how many repeats there are, and reset it if it doesn't repeat. If variable is above a number, then choose accordingly.

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