spawn family member by index

0 favourites
  • 4 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Hi, I would like to know if its possible to spawn a specific member of a family by its ... maybe family-index?

    Example: family "Assets" contains the Sprites "Trap", "Fire", "Skull".

    Then i would like to spawn Asset(0) for "Trap" and spawn Asset(2) for Skull.

    If there are other ways of dynamically creating objects "by name" for example that would be also nice to know.

    I need this for a MapEditor like the Super Meatboy one, where you can place assets with your mouse and swich through all of them with your mousewheel.

  • Have you considered using different animations / frames in a single object?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks for the anwer.

    I will use this method for the tiles.

    but i thought, since i have the logic for the other assets, already for the game, i could use this assets them selfs, instead of an other object representating them.

    (With logic i mean assembling complex Assets OnCreate.

    An easy example is an fire place, which is assambled from

    "wood" sprite and a "flames" particlesystem)

  • Hmm.... I'm looking to do something similar. I have a "machine" that makes objects for you. I want to make a family for those objects, and have every object that "IsBuildable" to pop up on the screen for the user to choose. I need to look into how people are doing inventories. :-P

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