Problem with grid movement and animation.

This forum is currently in read-only mode.
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • 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?

  • 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.

  • 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?

  • Not sure, it might be how you have your animations set up. Post a cap I guess.

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

    Hopefully that helps.

    By the way, how do I upload files on this forum?

  • 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)

    http://dl.dropbox.com/u/666516/anihero.cap

    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.

    http://www.dropbox.com/referrals/NTY2NjUxNjk

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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"

  • The events work perfectly! Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)