Problem with grid movement and animation.

For questions about using Classic.

Post » Thu Apr 22, 2010 5:27 pm

So I have 4 walking animations, one for each direction, and I want my character to animate when it moves using the grid movement behavior. So, my events for this look like this:
http://i150.photobucket.com/albums/s117 ... roblem.png

The animation plays fine when the player moves for the most part, my problem is, when the player stops moving, then moves again in the same direction, the animation won't play. It also won't play when the player moves initially at the start of the game, but if he stops then moves in a different direction it plays fine again.

Anybody know what I'm doing wrong?
B
4
G
3
Posts: 31
Reputation: 964

Post » Thu Apr 22, 2010 9:07 pm

If you check in preferences when you have the Animator open, you'll notice there's a option called Tags.
This lets you set the animation automatically in the platform behavior, and grid movement behavior.
I believe the given tags are stopped, walking, running, etc.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Apr 22, 2010 9:46 pm

Thanks, that fixed my problem. However, now it's only playing the first 2 frames of the animation, instead of all 4 like it should. It seems to me like the animation gets reset every time the character moves to a new grid space, because it plays all the way through when I set the movement speed lower. Is there some way around this?
B
4
G
3
Posts: 31
Reputation: 964

Post » Thu Apr 22, 2010 10:02 pm

Not sure, it might be how you have your animations set up. Post a cap I guess.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Apr 22, 2010 11:31 pm

http://host-a.net/ivan_mage/animation_problem.cap

Hopefully that helps.

By the way, how do I upload files on this forum?
B
4
G
3
Posts: 31
Reputation: 964

Post » Fri Apr 23, 2010 12:51 am

It seems you were using one as a sub-animation. Walking, stopped, etc should have their own.
Here's version showing them as separate.(saved in 99.84)
[url:2y7j17la]http://dl.dropbox.com/u/666516/anihero.cap[/url:2y7j17la]
Might as well update to the current unstable... its actually pretty ... stable.
Also there is an uploads section, but it's reserved for demo's etc. to keep Scirra's costs down.
Most of us use Dropbox a free hosting service instead.
[url:2y7j17la]http://www.dropbox.com/referrals/NTY2NjUxNjk[/url:2y7j17la]
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Apr 23, 2010 3:51 am

Oh yeah, I did that by mistake, and couldn't find a way to undo it, but if that fixes the problem then great. Where do I download the unstable version of construct? I can't find in the developer, or the downloads section.

Well, anyway I separated the 2 animations like you said, but the animation still gets cut short.
B
4
G
3
Posts: 31
Reputation: 964

Post » Fri Apr 23, 2010 7:28 am

Each grid is set to 32, and your speed is 120, that means you have .325 seconds to show the animation before it resets. With each frame set to 10, that will give you .4 seconds of animation to show for each cell... not enough time.

You can either change your grid settings, and animation settings.... or, not use tags and set up your own with events:
+ Hero: is moving
-> Hero: Set animation to "archerwalk"
+ System: Else
-> Hero: Set animation to "archerstand"
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Apr 23, 2010 4:23 pm

The events work perfectly! Thanks!
B
4
G
3
Posts: 31
Reputation: 964


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests