Smooth Grid Movement

Get help using Construct 2

Post » Sun Feb 16, 2014 5:57 pm

Hello, I'm new to Construct 2 but I have a game in mind I want to create and it uses Grid Movement. I've searched through the forums and Google, even found a thread from 2 months ago on this topic. However, all the links from the previous thread are inactive so it's not very useful. I've looked at the "How Do I" thread as well, but it seems none of the links cover what I'm looking for.

I've found a video of the movement style I'd like, however I'm not allowed to make links yet. So, if you Youtube pokemon gameplay, it should give an idea of the type of movement.

Basically, I'm planning on using the keyboard arrows for movement, and what I'd like to happen is for the hero sprite to move one grid per press of the proper key, and if the key is held for it to continue moving in that direction but staying with the grid. While the sprite is moved, it is animated, and if the direction key is tapped (rather than held) for the animation to play once fully. In the video, the key is held so it makes it look like the hero is walking. If the button is tapped, it looks like the hero takes one step.

I currently have 8-Direction as my movement, although it's changed to 4 direction and is animated.

Can anyone help me recreate this classic style of movement? Thanks for all your time and help!
B
5
S
1
Posts: 31
Reputation: 437

Post » Sun Feb 16, 2014 9:18 pm

Wow that took longer than I thought.

CAPX

Also note that player collision polygon is 1 pixel inward.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Sun Feb 16, 2014 9:48 pm

Thanks for the reply! It works smoothly. I notice that you created your own movement, not using the 8-Directional Movement. I'll have to pick through it a bit more tomorrow to decipher all the pieces.

I really appreciate the help!AlexandrTheGreat2014-02-16 21:57:55
B
5
S
1
Posts: 31
Reputation: 437

Post » Sun Feb 16, 2014 9:59 pm

Actually I forgot I am using version 161 but it should't open it then if you are using later version. If that even is the issue.Katala2014-02-16 22:01:17
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Mon Feb 17, 2014 1:24 pm

I don't suppose you'd write out the steps to achieve the end result?

Edit: Nevermind, I'm figuring most of it out. :)AlexandrTheGreat2014-02-17 13:45:03
B
5
S
1
Posts: 31
Reputation: 437

Post » Thu Apr 03, 2014 7:05 pm

That Capx helped me so much! I really appreciate it, thank you :)
B
5
S
1
Posts: 2
Reputation: 406

Post » Fri May 16, 2014 12:52 am

Hello!

Using @Katala source code, I implement touchscreen.
But it does not work.
What am I doing wrong?

https://db.tt/X9c9Wgi7
B
47
S
12
G
5
Posts: 124
Reputation: 6,851

Post » Sat May 17, 2014 5:57 pm

@Wenaptic Maybe you should use UI buttons or path finding.
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Wed Oct 08, 2014 6:48 am

I put this in my game, changing everything to 16 instead of 32. It worked in your example, but it will not work in my actual game. Is there something I didn't do properly?

EDIT: I made sure all variables and what-not were the same, so there weren't any errors on import. I simply replaced my movement code with yours and nothing happened.

EDIT 2: I left it at 32 because I realized that's the size I needed anyways, but it still didn't work. :\
B
25
S
6
G
6
Posts: 265
Reputation: 3,696

Post » Wed Oct 08, 2014 7:35 am

Wenaptic try this
You do not have the required permissions to view the files attached to this post.
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,753

Next

Return to How do I....?

Who is online

Users browsing this forum: beohs, tunepunk and 10 guests