4-Direction Movement problem

For questions about using Classic.

Post » Mon Apr 07, 2008 11:58 pm

(Before I say anything I'd like to thank Deadeye for his tutorial on animation 8) )


[url:1hjo1ezl]http://img520.imageshack.us/img520/4859/moveproblemju9.png[/url:1hjo1ezl]

Okay...

My character can move up, down, left and right and it plays the animation of him walking properly.

When he stops moving he goes back to his standing animation, like he should.

When you are walking up/down and you press either left or right at the same time he doesn't change direction or stop moving.

But...

When you are walking left/right and you press up or down it DOES move him.

I'm wondering if this is a fault in my event layout, or if it is some kind of a bug in Construct? I tried changing it from "Move Left" is down to key is held down but that didn't help.

I tried removing the 8 Direction behavior (I switched it from 8 to 4) and made the sprite move manually but that caused a new problem; the sprite moves but it won't play the walking animation.

I meant to copy the .cab to my player before I left for work but I accidentally copied the .exe instead, so I'll have to wait until tomorrow before I can post it.

Not that its likely to help, but;

[url:1hjo1ezl]http://www.mediafire.com/?y00t3lpy4ay[/url:1hjo1ezl]


Oh, I just started using Construct yesterday and tried getting a crop system working, so don't mind the fact that I only have the "facing down" animation for it added, and the fact that for some reason you have to hold down the shift key even though it is set to "pressed"... and never mind the fact that if you hold the key down for too long it locks you on the "standing still" animation when you try to move...

One problem at a time. :mrgreen:

Well, thank you very much for any suggestions that you might have! I expect a certain amount of frustration whenever I try to learn a brand new program so I'm patiently optomistic about moving my old project to Construct.
[/url]
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Tue Apr 08, 2008 12:28 am

If thats not the problem, send source becouse its hard to say from exe file and reconstructing it as cap... seriosly
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Apr 08, 2008 12:30 am

Yeah, I'm sorry about that. When I realized that I copied the wrong file I wondered if I should even bother posting this. If I don't figure out the problem tonight I'll be sure to post it tomorrow.
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Tue Apr 08, 2008 12:35 am

Okay its probably the event-sort problem, sort it like:
-Down is down.
-Left is down.
-Up is down.
-Right is down.

Copy it so you have 4 of them for every direction, then negate the stuff you dont want to have.

Edit:
Here's example, [url:3vckvhnm]http://www.mediafire.com/?jjsqedwyygx[/url:3vckvhnm] oh yeah and that "Once while true" is to not loop the Angle change (OPTIMALIZATION!!! LOLOL)

Edit2: Wow i just noticed the "Once while true" in your code, make them as sub-event and move the Angle change into it!
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Apr 08, 2008 12:45 am

Thank you!

...I'll have to wait until I get home to test it but its a good suggestion.
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Tue Apr 08, 2008 1:15 am

I... wrote a tutorial on animation? :shock:

Anyway, without the cap to go on I'd venture the same guess as Doppel, it's probably a hierarchy thing with your event conditions.

Also... USE HOE! Those farmers get all the booty :lol:
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Apr 08, 2008 1:17 am

[quote="deadeye":1bymdnjb]I... wrote a tutorial on animation? :shock:[/quote:1bymdnjb]
He meant probably your "Hitler" game.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Apr 08, 2008 3:33 am

[quote="deadeye":3437igaf]I... wrote a tutorial on animation? :shock:[/quote:3437igaf]

Well... sort of. I was referring to this answer that you gave long, long ago in the dark and troubling times known as "January".

[url:3437igaf]http://scirra.com/phpBB2/viewtopic.php?t=514[/url:3437igaf]


Hmmm.

A platformer starring Adolph Hitler... and a fangame. Technically, which is more loathesome? :oops:
B
4
S
2
G
4
Posts: 401
Reputation: 2,302

Post » Tue Apr 08, 2008 5:40 am

... It's Adolf. Not Adolph.
B
2
S
2
G
4
Posts: 110
Reputation: 1,670

Post » Tue Apr 08, 2008 6:42 am

Oh, that old thing. I totally forgot about that. I should update that now that the platform movement's been updated. It doesn't work right any more. Glad you found it useful, though.

[quote="Caspis Sinclair":2yiulgrq]Hmmm.

A platformer starring Adolph Hitler... and a fangame. Technically, which is more loathesome? :oops:[/quote:2yiulgrq]

I am a terrible person :(
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests