Has anyone had a "Sprite Stampede"?

Get help using Construct 2

Post » Thu Jul 31, 2014 7:25 pm

Hey guys, I'm making a lot of headway on my game Dragon Vs. Knight and I have a quick question.

Has anyone who has made a game where you have to shoot at targets coming to you have this happen: when you open up the game after going past the title and how to play screen have all the target sprites rush at you all at once and bam instant game over?

In my game this only happens if you're on the title and how to play screens for a while, but if it's only for a few seconds it doesn't happen. If anyone can tell me why this is happening and how to fix it that would be great.
Thanks!

Dropbox Link: https://www.dropbox.com/s/wmjtwsz19krcv ... tHelp.capx
B
10
S
1
Posts: 69
Reputation: 641

Post » Thu Jul 31, 2014 8:40 pm

You have defined the spawn times by a tick count. The ticks are being calculated before the gameplay layout is set active. This means, even before you are in play mode, your enemies are spawning. You can easily fix this by adding a family with all the enemies, arrows and the prince/princess and on start of layout, destroying them. That way, the level will start fresh.
B
39
S
12
G
11
Posts: 331
Reputation: 7,727

Post » Fri Aug 01, 2014 9:44 pm

FragFather wrote:You have defined the spawn times by a tick count. The ticks are being calculated before the gameplay layout is set active. This means, even before you are in play mode, your enemies are spawning. You can easily fix this by adding a family with all the enemies, arrows and the prince/princess and on start of layout, destroying them. That way, the level will start fresh.


How do I add a family? If possible can you add an image too please? Thanks.

Edit: Just figured out how to add a family via tutorial.

Edit2: I just added the "destroy family" event on a start of layout condition and the sprite stampede is still happening.
B
10
S
1
Posts: 69
Reputation: 641


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Yahoo [Bot] and 29 guests