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

Get help using Construct 2

Post » Tue Jun 09, 2015 3:27 pm

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 ;)
Last edited by RayKi on Tue Jun 09, 2015 6:07 pm, edited 1 time in total.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Tue Jun 09, 2015 3:44 pm

To know if there's something wrong with your code, we'd need to see your code..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jun 09, 2015 3:59 pm

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.
B
74
S
31
G
26
Posts: 994
Reputation: 20,198

Post » Tue Jun 09, 2015 4:01 pm

LittleStain wrote: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.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Tue Jun 09, 2015 6:08 pm

Magistross wrote: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 :D
B
17
S
7
Posts: 280
Reputation: 2,522


Return to How do I....?

Who is online

Users browsing this forum: worm1 and 38 guests