# Grid movement with gravity changing

Get help using Construct 2

### » Sun Jan 15, 2012 6:13 pm

Hi,

a few months ago I tried to make grid movement in CC, and Yann was helped me with his idea, but there was several problems and no time to finish... I succeeded partly to solve problem, but when the direction od gravity is 90 or 270 left and right direction of movement are replaced.

capx

Thanks!!!
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

### » Sun Jan 15, 2012 7:20 pm

Oh my ugly code, I was so young

now I do grid movement like that:
gridMovement.capx

Oh ok I see now... Not so ugly after all, there'are vectors *_*
Last edited by Yann on Sun Sep 14, 2014 10:07 pm, edited 1 time in total.
B
69
S
22
G
14
Posts: 1,488
Reputation: 16,594

### » Sun Jan 15, 2012 9:11 pm

There you are
gridSideScroller.capx
Last edited by Yann on Sun Sep 14, 2014 9:58 pm, edited 1 time in total.
B
69
S
22
G
14
Posts: 1,488
Reputation: 16,594

### » Mon Jan 16, 2012 4:46 pm

Thanks, there are so many great things (to learn) in just fifteen events. Now I can (start and) finish something.podpathos2012-01-16 16:46:37
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

### » Mon Jan 16, 2012 9:02 pm

Well I hope you have a good idea 'cause in this example you can't jump on a platform (move up and move sideway). Once you jumped you have no choice but to fall. Because you can only move one direction at a time and falling wins over left and right.
Otherwise you would never fall by keeping your finger on left or right arrow. You can try by changing the order and put the fall event underneath the left and right (: (try it, it's fun you're floating \o/)Yann2012-01-16 21:03:11
B
69
S
22
G
14
Posts: 1,488
Reputation: 16,594