Animation problems

For questions about using Classic.

Post » Wed Jul 22, 2009 10:55 pm

It seems like tagging is completely broken. It doesn't matter which version of Construct I use, it just never works. I tagged my stopped animations as stopped and my walking animations as walking and it does nothing.

So, instead I set it so the events trigger the animations.

I finally managed to get everything running smoothly as possible with the correct animations playing and everything and now I've run into another problem.

When pressing diagonals (up/right, up/left, down/right, or down/left) the running animation plays fine, yet when it stops, it doesn't play the diagonal stopped animation.

Instead, it uses only the up, down, left, or right stopped animations.

I don't want to make it so the player can only face diagonals while moving as that will make combat really annoying (I might turn this into a Zelda-like engine).

Here is the cap file (uses the latest unstable build (by accident really, whoops)):
http://machriderx.googlepages.com/RPG.cap

As you can see, when you move diagonally, you can't really stop diagonally.

If anyone knows how to fix this, I would appreciate it.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Thu Jul 23, 2009 12:16 am

I'm not on my Construct computer at the moment but I'm guessing that the issue has to do with the fact that you aren't really letting go of both keys on the exact same tick. So the animation is being set to whatever key you had pressed last, even if it was just for a millisecond or so.

If that's the case then you might try a timer of sorts. If one key is let go, then the timer starts, and when the timer is done counting down it checks to see if the other key has also been let go. Then, if no other keys are being pressed, set the animation to the proper angle.

The timer doesn't have to be very long, just a fraction of a second.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jul 23, 2009 1:02 am

if it's this, the other day I was just pondering if there was a nice, comfortable solution for this.
I've seen even commercial games make this mistake and anything I can think of so far is cumbersome (say, you want something to happen when 3 buttons at the same time? that'd be 9 events)
Perhaps a finite state machine would help, come to think of it....
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Jul 23, 2009 2:26 am

This is frustrating me to no end. I thought I fixed it, yet I now have the same problem but in reverse!

Now the sprite keeps stopping at diagonals when I don't want it to.

Try this cap, hold the down key then try going right. It keeps going to the diagonal, even long after you stopped pressing down and are simply pressing right, or vice versa.

http://machriderx.googlepages.com/RPG2.cap

It must be a simple mistake I'm making, yet I can't figure it out at all.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Thu Jul 23, 2009 4:21 am

Works perfectly for me on 0.99.4
What version of Construct are you using?
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Jul 23, 2009 4:27 am

[quote="Madster":2motxg3j]Works perfectly for me on 0.99.4
What version of Construct are you using?[/quote:2motxg3j]

The same version as you are.

What I am witnessing is very subtle, so perhaps I didn't describe it very well. Let me clarify.

Try moving left then press down and keep walking down. When you let go, the character faces the diagnonal, not down. This is not what I want.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Thu Jul 23, 2009 6:50 am

I figured it out. I was just being stupid and over complicating things, like I always do. Like that one time I argued with deadeye about how to make a grid movement, anyway nevermind that.

I decided to start over from scratch. After brainstorming and actually using my head, I figured out a way to do this in only 2 events, completely eliminating most (if not, all) the problems I had before.

So anyway here it is, my new and improved engine:
http://machriderx.googlepages.com/RPG3.cap
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Thu Jul 23, 2009 7:42 am

[quote:8yaj7zl0]Like that one time I argued with deadeye about how to make a grid movement, anyway nevermind that.[/quote:8yaj7zl0]

At first I was like "argued about what?" I had to actually look this up because I had no idea what you were talking about. Man, that was over a year ago! :P

Anyway, glad to hear you got this all sorted out :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jul 23, 2009 8:21 am

[quote="machrider"Try moving left then press down and keep walking down. When you let go, the character faces the diagnonal, not down. This is not what I want.[/quote]
What I did was holding a direction, then tapping the orthogonals alternatively without letting go the original direction. The animation went how its supposed to go, doing the diagonals and then going back to the initial direction. Also tried doing circles, went perfectly.

Didn't see any weirdness at all, checked thrice :s
I'll check again. Maybe I missed it, though that would be weird.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Jul 23, 2009 8:58 am

[quote="deadeye":28su5mtk][quote:28su5mtk]Like that one time I argued with deadeye about how to make a grid movement, anyway nevermind that.[/quote:28su5mtk]

At first I was like "argued about what?" I had to actually look this up because I had no idea what you were talking about. Man, that was over a year ago! :P

Anyway, glad to hear you got this all sorted out :)[/quote:28su5mtk]

i was just kidding, making a self-referential joke. But I do have a habit of not getting it the first time though. anyway thanks again for the help. I appreciate it.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests