Scrolling Background Speed..

Get help using Construct 2

Post » Wed Apr 15, 2015 12:10 pm

Hey I placed this in a previous post but didn't manage to get any replies. So sorry in advance for asking again......

I have a run track which is a scrolling background. The coding for the movement of my track is: RunTrack.X-(dt*200*RunTrack.Speed)
I want it to gradually increase in speed so i created a global variable called 'TrackSpeed', and every 2 seconds 5 is added to the variable.

Where in the RunTrack.X-(dt*200*RunTrack.Speed) equation do i integrate the global variable?
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Wed Apr 15, 2015 12:16 pm

RunTrack.X-(dt*200*(RunTrack.Speed+TrackSpeed))

or just ad every 2 second 5to RunTrack.Speed...
Last edited by korbaach on Wed Apr 15, 2015 12:19 pm, edited 2 times in total.
Image
B
62
S
23
G
7
Posts: 1,469
Reputation: 10,729

Post » Wed Apr 15, 2015 12:17 pm

I guess the solution above was better.. haha

Ninjaaaad..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Apr 15, 2015 12:24 pm

I tried that initially. it just makes the track move really really fast. I think because its being x(multiplied) as opposed to +(added) due to the 200* part of the coding
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Wed Apr 15, 2015 12:32 pm

can u upload capx with track?
Image
B
62
S
23
G
7
Posts: 1,469
Reputation: 10,729

Post » Wed Apr 15, 2015 12:56 pm

Wasn't uploading properly so i hope this helps

Image
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Wed Apr 15, 2015 2:03 pm

drag subevent "System Every 2 sec" above "System Every Tick"..
Image
B
62
S
23
G
7
Posts: 1,469
Reputation: 10,729

Post » Wed Apr 15, 2015 10:25 pm

I tried that and it didn't work. Luckily i accidentally figured it out haha. The brackets were in the wrong place

Instead of putting.....
RunTrack.X-(dt*200*(RunTrack.Speed+TrackSpeed))

it was.....
RunTrack.X-(dt*(200*RunTrack.Speed+TrackSpeed))
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Wed Apr 15, 2015 10:26 pm

Thank you for your help guys!
B
8
S
2
Posts: 146
Reputation: 1,132


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest