Coin Spawnage?

Get help using Construct 2

Post » Wed Oct 31, 2012 4:24 pm

Hey guys i am working on my infinite runner and want to add in coins. What I have down right now is that they are spawning every couple of seconds and there is to many of them spawning, is there a way to limit this or even a better command to spawning them? Thanks :D

capx: https://www.dropbox.com/s/hwwugkfbj7dd7re/lavarun-29caoz4znwzbr-29caoz4znwzbr-29caoz4znwzbr.capx?m
B
7
S
2
G
3
Posts: 15
Reputation: 2,319

Post » Wed Oct 31, 2012 6:53 pm

Could you create a global variable to track/count coins as they are spawned? Then your 'coin generation' events could check to see if the variable is less than x and if so, spawn another coin.

Then, as the player collects a coin, decrement the count by one.
B
22
S
5
G
6
Posts: 57
Reputation: 4,487

Post » Wed Oct 31, 2012 8:29 pm

Sounds like you might be spawning them "every tick" by accident

add the condition "triggers once while true" to your event that creates the coins to limit it to creating one at a time.

Can't look at the capx right now.

B
50
S
21
G
8
Posts: 844
Reputation: 10,299


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests