8-Direction Movement Collisions

New releases and general discussions.

Post » Mon Jul 01, 2013 10:56 pm

I'm making a simple SNES-like RPG.

I've loaded in my main character sprite, animations, etc.

I'm using the 8-direction movement behavior for control, but I'm having a problem with collisions. This is a little hard to explain but I'll try.

Whenever I collide with a box object, but I'm not facing the object, my character stops. I can move away just fine, but If I try to face the object, my character get's stuck on the current animation and won't turn to face it.

I've tried including a keyboard object and then creating an event so that when my character speed is 0 and the up character is pressed then set the animation to facing up. But when I do this, the character looks up for a split second and then turns back to facing away.

Is there some option with the 8-direction behavior to make my character face the right way when against a solid box object?

Please let me know if the description was confusing and I'll try to explain it better.

Thanks!
B
2
Posts: 1
Reputation: 152

Post » Sat Jul 06, 2013 3:19 pm

@WhyBotherShaving seen your post, and I had been planning to make an example on this for you but haven't found the time. I'll hopefully have a solution for you soon though
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481

Post » Sun Jul 14, 2013 2:46 pm

Okay, had some time to throw something together and here's the example: https://dl.dropboxusercontent.com/u/4714446/8Dir.cap

What I did is disable the behavior from changing animation frames, and set it from events (I used the Control Is Down event as it always will match the keys you set in the project properties that way).

Hope that helps!
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest