0 Favourites

Multiply objects next to each other

  • I am a newbie at programming and want to make a simple game. I am making a virus game and I want them to multiply next to each other individually. So far I was able to create a version of what I'm trying to make but it seem like it isn't going in the right direction. I want to keep them multiplying as I kill each one of them. Can anyone show me or suggest a good way to do it? Mine has too much unnecessary spawning objects in one screen. I also don't want them to spawn over the walls. I want to make it simple as possible.

    On "testing" file, I can make them spawn but they keep spawning because I can't figure out a way how to get rid of the spawn objects.

    For "testing02" file, the objects are multiplying fast! (be careful it will crash).

    I have attached the files here to take a look at. I am hoping a way to make them spawn without using spawn objects to have better performance.

    So basically, I want them to continue spawning until the last one is destroyed.

    Thanks,

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Smile4me

    Take into account that when you spawn one object, you will also create all objects which are in the same container. So maybe, instead of keeping then in container, you should spawn each of the manually, that way you will have better control.

    Also, instead of 4 separate spawn objects (like 01,02-04 in your example) maybe you can create just one, and then use condition "for each"

    Also you could put them into family. Link about families:

    https://www.scirra.com/manual/142/families

    PS then we can look into wall spamming, but I would suggest that you open new thread for that <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Thanks, I will consider that. I think what you were saying is close to what I have in "testing" file.

  • Smile4me

    NP, If you have any more questions about "for each" or family, shoot.

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