How do I set a spawned object to the road *dt speed

Get help using Construct 2

Post » Sun May 08, 2016 3:45 pm

Ok people, first off Happy Mother's Day to any game making Mothers out there.

Here is what I'm facing. I'm working on an Infinite Runner game but I'm haveing trouble spawning objects and they match the road movement speed.

Please let me explain: I have the road and the background set to *dt speed which is fine, however, I want to gradually speed up that speed time so it looks like my player is moving faster. (You'll see in the sample) The problem I'm facing is I can't make the pitfalls match the speed so they look like they are on the road and not floating across it.

One is an oil spill and the other is a sink hole so they need to look and move with the road speed once they spawn to look like they're one with the road. :) I should mention they have bullet behaviors.

A few things to note as well before you look, I am still working on the graphics and sounds, some of the graphics (Buildings and Cars) I did not do but eventually will get replaced with my own works. Player animations I did do and I have set it to go from slow to very fast for testing purposes eventually I want the speed to be gradual the more blocks you run.

See for yourself

http://goo.gl/c3ZHIO
ARROW KEYS TO MOVE
DON'T LET YOUR FEET HIT THE FRONT BUMPERS OF THE CARS
AVOID THE PITFALLS

Thank you in advance for any help
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
40
S
19
G
4
Posts: 367
Reputation: 6,404

Post » Sun May 08, 2016 7:13 pm

I'm thinking that you could set your dt*speed that you're using for the road and the buildings as a global variable. Then when you're spawning the sinkholes and oil slicks, you set the speed to that variable, that way it's always up to date.
B
69
S
40
G
24
Posts: 356
Reputation: 18,314

Post » Mon May 09, 2016 12:56 am

OK, ok, thank you I will try that. That makes since.

Thank you
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
40
S
19
G
4
Posts: 367
Reputation: 6,404


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot], YoHoho and 17 guests