How do I Auto-runner

Just started using Construct 2? Post your questions here

Post » Thu Apr 16, 2015 9:25 pm

For every 10000 traveled create a sprite
in the center of the screen.
10000 object appears, 20000 object appears, 30000 object appears ...etc
B
10
S
2
G
1
Posts: 21
Reputation: 781

Post » Thu Apr 16, 2015 9:30 pm

If the speed at which your screen scrolls remains constant, then you could do something like this:

Every (10000 / ScrollSpeed) seconds: Create object at x, y

Where ScrollSpeed is the speed of your screen scrolling in pixels per second.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,096

Post » Thu Apr 16, 2015 9:36 pm

I refer to Template:Auto-runner
Can you post a link/tutorial/example? or capx file.
plz
Last edited by LC2 on Thu Apr 16, 2015 9:45 pm, edited 2 times in total.
B
10
S
2
G
1
Posts: 21
Reputation: 781

Post » Thu Apr 16, 2015 9:41 pm

Everything I said still applies -- find out how fast the platforms in the level move and that would be your ScrollSpeed.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,096

Post » Thu Apr 16, 2015 10:47 pm

When a player falls the layout restarts and this tip does not work.
How can I do to make it re-count? "reset"
B
10
S
2
G
1
Posts: 21
Reputation: 781

Post » Fri Apr 17, 2015 1:07 pm

use reset global variables action
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
60
S
14
G
2
Posts: 285
Reputation: 6,494

Post » Fri Apr 17, 2015 3:47 pm

Based on the auto-runner template you want to use the global variable "TotalDistance" with Linkman's idea.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
271
S
99
G
70
Posts: 7,267
Reputation: 75,769

Post » Sat Apr 18, 2015 1:46 am

Global variables reset but time will not.
This causes the object to be created before 10 000

Please someone :?:
B
10
S
2
G
1
Posts: 21
Reputation: 781

Post » Wed Apr 22, 2015 2:38 am

I managed to solve the problem of the object. but I have another question.

How to create a different object in different positions on the screen?
B
10
S
2
G
1
Posts: 21
Reputation: 781


Return to Beginner's Questions

Who is online

Users browsing this forum: IndustrialEG, Maurilio Pedro and 1 guest