How do I create multiple objects of the same simultaneously, while positioning them?

0 favourites
  • 2 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hello

    So I have a sprite (Person2) looping through an animation. During the second from last frame a new object (sprite) is created (Create object Fire on layer 5 at (Person2.BBoxRight +5, Person2.BBoxBottom +10).

    This newly spawned object is destroyed as soon as the animation that triggered the creation is finished.

    My issue is that if I were to "copy and paste" this character multiple times into the level, only one of these Person2's will have this object (Fire) placed/created beside it. I guess that my problem is that every created object (Fire) is simultaneously placed at one of these Person2's. If so, I have no idéa how Construct determines where to position it.

    If I were to let every unique Person2 have a different Initial Frame in their properties, a new Fire object could easily be created beside the creator origin on different ticks (and be individually destroyed too.) However, this could in practice turn a bit tedious. And I would prefer to have every Person2 behave excatly the same during the level, since the timing aspect is essential within the game.

    As the title describes. How would I go about to be able to have multiple Person2's animating on the same tick/second while also creating their own individual Fire beside them?

    Thanks in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've managed to solve my problem.

    I kept the "Create object Fire on layer 5 at (Person2.BBoxRight +5, Person2.BBoxBottom +10)".

    The only thing I did was applying a sub-event saying "For each Person2", Create Object Fire.

    I thank all of you that took your time to read my post.

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