How do I work with multiple instance?

1 favourites
  • 3 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • I want each instance to have its own duration for "idle" animation and then it will have 2 choices to choose from "idle" or "eat".

    1. if it chooses to do "idle" it will do the same loop,

    2. if it chooses to do "eat" it will run the eat sequences action,

    and when it's done it will choose again.

    This is working as I expected if it only has 1 instance

    But if there are multiple instances,

    it will instantly become a disaster.

    This is what I expected each one to do

    This is what multiple instances do

    This is an Eventsheet

    This is a project file

    https://www.dropbox.com/s/0p7dhpzyleisrbf/Each%20Square%202.c3p?dl=0

    Thank you

  • First of all - never use "Trigger once" with multiple instances!

    Also, your events 2 and 3 are running on every tick, creating lots of delayed wait-threads, which is also bad.

    Instead of "Wait 0.1" try Timer behavior. Start a timer, in "Square On Timer" event decide which action to do next. And in the same event either restart the idle animation, or begin the eating sequence.

    .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First of all - never use "Trigger once" with multiple instances!

    Also, your events 2 and 3 are running on every tick, creating lots of delayed wait-threads, which is also bad.

    Instead of "Wait 0.1" try Timer behavior. Start a timer, in "Square On Timer" event decide which action to do next. And in the same event either restart the idle animation, or begin the eating sequence.

    .

    Wow!, this is beautiful!

    I'll apply this and will let you know.

    Thank you!

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