Always move forward, but change position on x axis

Get help using Construct 2

Post » Sat Nov 16, 2013 12:03 am

I need help getting my character to always move forward, as in straight and no backwards, but be able to change his position on x axis to dodge things. Kind of like a launch kind of game. And please, no capx, just explain in chat. Thanks, Tabortaborgreat2013-11-16 00:03:22
B
9
S
1
Posts: 42
Reputation: 622

Post » Sat Nov 16, 2013 3:32 am

So by 'forward' you mean moving up the Y axis i assume ? To move up constantly use the Move At Angle event, where the Angle is 270.
B
45
S
15
G
73
Posts: 2,007
Reputation: 43,396

Post » Sat Nov 16, 2013 3:55 am

Do you have any idea on how I could make the speed it moves start fast and get slower. Using the move at angle event? @plinkie
B
9
S
1
Posts: 42
Reputation: 622

Post » Sat Nov 16, 2013 3:56 am

Yep, where you set the angle, increase the distance(1 is default), that's the number of pixels it will travel per tick. If you want to slow down over time I would recommend looking at using the 8 direction behaviour where you can better set the speed.plinkie2013-11-16 03:59:06
B
45
S
15
G
73
Posts: 2,007
Reputation: 43,396

Post » Sat Nov 16, 2013 4:00 am

I'm not that dumb! hehe, I was wondering how I could make the speed start off at like say 5 and then slowly go down to 0. Then I could add an upgrade system called speed that would make it so I could change that number when you upgrade the variable @plinkie
B
9
S
1
Posts: 42
Reputation: 622

Post » Sat Nov 16, 2013 4:08 am

If you're going more complicated then -
Assign 8-direction behaviour to the object
Every tick > Simulate Control (Up)

Then you can easily use Set Speed to alter the speed after so many seconds and then set it back again after an upgrade
B
45
S
15
G
73
Posts: 2,007
Reputation: 43,396

Post » Sat Nov 16, 2013 4:15 am

I ended up just making a variable called speed, setting it to five, then saying every (player.lifespan) seconds, subtract 1 from player.speed. That way I could have two upgrades, life span and speed. Thanks so much though for telling me about move at angle! @plinkie
B
9
S
1
Posts: 42
Reputation: 622


Return to How do I....?

Who is online

Users browsing this forum: camtray, marcoscodas and 11 guests