[Solved] Is there a limit for how many objects I can create?

  • Hello everyone, how are you today?

    In the game I'm currently developing there's this enemy that shoots projectiles upwards, and it's apparently working fine. The character keeps his idle animation until the player is on sight, then the character changes to the shooting animation and at a certain frame of the animation the upward projectile is created.

    However in this new stage I'm building I set a bridge for the player to cross, and under it I placed a lot of this enemies that shoots upwards. And as a result, some of them notice the player at the same time, start the animation at the same time, but the projectiles however are not created for every instance of the enemy.

    So, is there something wrong in my code? or is there a limit for the amount of objects that can be created at the same time? Or is there any kind of limitation in construct2 when it comes to comparing several frames of several objects? Anyone knows anything about that?

    Thank you very much for your attention

  • To know if there's something wrong with your code, we'd need to see your code..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I suspect you used the System's "Create object" action to spawn your projectiles. It fires only once, no matter how many objects currently in the SOL. You can either add a "For each enemy object" condition or replace the action by a "Spawn object" under your enemy sprite object.

  • To know if there's something wrong with your code, we'd need to see your code..

    Otherwise you suffer from LittleStain's signature. Horrifying. :-p

    I have built a client that creates and maintains the position of up to 150,000 sprites at once before.

  • I suspect you used the System's "Create object" action to spawn your projectiles. It fires only once, no matter how many objects currently in the SOL. You can either add a "For each enemy object" condition or replace the action by a "Spawn object" under your enemy sprite object.

    I didn't know about the spawn function. It worked perfectly, thank you very much

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