Random Terrain (spawned from emitter)

Get help using Construct 2

Post » Sat Jul 21, 2012 8:57 am

I have a tile emitter that I move up and down off the screen. It creates a new sprite and I move it across the screen at Speed*(dt*60).

My question is, what is the best way to call the spawn method? If I set it for a set number of seconds, it is never 1000% accurate and there will be gaps in the chain.

To summarize. I want to spawn, one after another (gapless), a sprite from an emitter. How can I make sure, that given changes in gatetime speed, the emitting takes place without gaps.

Normally this is handled by a tiled BG. But I want more control.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Sat Jul 21, 2012 2:03 pm

Are you using "Every X Seconds"? If so, maybe it would be better to create a timer that decreases by 'dt' every tick. Or maybe you could post a .capx of the problem so we can have a look and see what happens?Nimtrix2012-07-21 14:04:17
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jul 23, 2012 6:03 am

Here is a link to an example. As you can see, even at a set time frame, it's not 100% accurate. If you sit and watch it, you will see some tiles are closer than others. I'm looking for a system that is 100% accurate somehow, even with massive time scale changes.

https://www.dropbox.com/s/88hjeb7ciyyek06/TerrianCapx.capx
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Mon Jul 23, 2012 1:38 pm

Okay, I think it's better to rely on the sprite's position instead of a timer. This seems pretty accurate to me, what do you think?

firebellyGame.capx (r99)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jul 23, 2012 6:53 pm

I spent hours trying to use position and couldn't figure it out. This is perfect though. How do I give you virtual chocolate chip cookies?
B
30
S
10
G
7
Posts: 416
Reputation: 7,239


Return to How do I....?

Who is online

Users browsing this forum: MarkThomas, signupdemo and 0 guests