How do I fix my respawn object events

Get help using Construct 2

Post » Sun Mar 12, 2017 3:57 pm

I have objects that respawn at invisible objects throughout my level, which use instance variables.

The timer for them to respawn is 5 seconds. They respawn just fine, but the issue is every object respawns at the same time, instead of waiting 5 seconds after it has been destroyed (which is when it leaves the layout).

Image
B
13
S
7
G
2
Posts: 65
Reputation: 2,307

Post » Mon Mar 13, 2017 12:27 am

I'm using the free version by the way, until I can buy a licence on my next payday, so I don't have access to all the features.
B
13
S
7
G
2
Posts: 65
Reputation: 2,307

Post » Mon Mar 13, 2017 1:10 am

If you don't want them to respawn at the same time use random in your timer

Every random(1,6) seconds: Spawn enemy

That will add randomness to the enemy.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Mon Mar 13, 2017 1:26 am

The respawn is not for enemies, but for platforms that fall or rise, but I get what you mean.

I tried this, the same thing happens, all the same platform type will spawn at the same time, instead of individually.

I set up a test area, with 5 platforms, I ran across them all, they all fell, at slightly different times, but they all respawned at the exact same time.

I need them to spawn 5 seconds after they are destroyed, so if one is destroyed and another 2 seconds later, the first will spawn, then 2 seconds later the other spawns.

I am at a loss as to why they do not spawn individually, they seem to just spawn all as one.
B
13
S
7
G
2
Posts: 65
Reputation: 2,307

Post » Mon Mar 13, 2017 2:08 am

SpyDaniel wrote:The respawn is not for enemies, but for platforms that fall or rise, but I get what you mean.

I tried this, the same thing happens, all the same platform type will spawn at the same time, instead of individually.

I set up a test area, with 5 platforms, I ran across them all, they all fell, at slightly different times, but they all respawned at the exact same time.

I need them to spawn 5 seconds after they are destroyed, so if one is destroyed and another 2 seconds later, the first will spawn, then 2 seconds later the other spawns.

I am at a loss as to why they do not spawn individually, they seem to just spawn all as one.


Hmmm?

I don't see your time event in your event sheet to tell what the problem is.

Post that and lets see how your time event is set up.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Mon Mar 13, 2017 2:22 am

I'll PM you the file.
B
13
S
7
G
2
Posts: 65
Reputation: 2,307

Post » Tue Mar 14, 2017 12:42 pm

https://db.tt/roO46NB2ue

I found a way to fix my problem, at least for resetting falling platforms. Check out the capx for how I did it.
B
13
S
7
G
2
Posts: 65
Reputation: 2,307


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, lukewasthefish and 16 guests