Mystery Mice: where are multiple instances coming from???

0 favourites
  • 3 posts
From the Asset Store
7 Dark mystery music ranging from a piano arrangement to full orchestral pieces.
  • I'm trying to have 2 different enemies on screen. I'm using EnemyBox to handle the bullet movement, with an animated sprite Mouse pinned for the animations... pretty standard. See the code snippet below.

    EnemyBox1 has Mouse1 pinned, EnemyBox2 has Mouse2 pinned and will have different specs. On the layout I have many instances of EnemyBox1 and EnemyBox2, but only 1 instance each of the mice.

    Here's the weird part. For EVERY EnemyBox1, the game is pinning an instance of Mouse1, so there's a horde of them. For EnemyBox2, only one instance of Mouse2 is getting pinned to EnemyBox2, and the other EnemyBox2's are empty.

    The code above is the ONLY code dealing with pinning the mice. So why are they behaving differently? EnemyBox2 and Mouse2 are both clones of the 1st version, so they have all the exact same parameters. I honestly don't know which is the correct, expected behavior given the code I'm using.

    Any advice would be greatly appreciated.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check if Mouse1 and EnemyBox1 are in a container.

  • Huh, that was indeed the issue. But I have no recollection of making the mouse 1 into a container. Very weird. Oh well, thanks for the heads-up!

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