Small animation hitch

OkyshoOkysho Member Posts: 158
edited November -1 in Working with GS (Mac)
Again, I find myself with a small problem. When my character does his jump animation, the jump animation is approximately 30 pixels longer than the other animations, so whenever my character jumps, he shrinks during his time in the air. I tried to adjust the size during the animation pose state (based loosely off of the one in the platformer template on the "new" screen) but it permanently increases the size and I haven't been able to find a solution to scale it back down.

Any suggestions from the GS community?

Comments

  • JGary321JGary321 Member Posts: 1,246
    You just need to change it back when not jumping.. Not sure how you have you're rules setup but take this as example.

    In Jump Rule (ex: when spacebar is down)
    Animation (jump animation)
    change self.width to (xxx)
    change self.height to (xxx, if needed)

    OTHERWISE
    change self.width to (xxx (back to normal))
    change self.height to (xxx (back to normal))

    Complende??
  • OkyshoOkysho Member Posts: 158
    I guess it does seem like a silly question...

    Thanks Gary for your reply, but I actually already tried this and for some reason it didn't work.

    Getting it to change sizes when jumping works fine, but getting it back without any problems is the issue...

    I'll keep fiddling with it. Thanks for the help
  • JGary321JGary321 Member Posts: 1,246
    Where ever your rule is to play the regular walking nimation, put the change width/height there.
  • JGary321JGary321 Member Posts: 1,246
    Where ever your rule is to play the regular walking animation, put the change width/height there.
  • cbtcbt Member Posts: 644
    I think you have to put something like

    -When collided with actor of type "floor" (When your character lends)
    change self.width to (xxx (back to normal))
    change self.height to (xxx (back to normal))

    I think this will solve it..
  • OkyshoOkysho Member Posts: 158
    Thanks again for all your input. For the most part it works fine with the exception of one little thing.

    When my character hits the ground now, the velocity slows down, almost like he's doing a small skip. For the most part this doesn't bother me, but it makes the animation look choppy
  • cbtcbt Member Posts: 644
    Does the velocity of the actor or the animation slows down?

    Make sure to make friction and restitution 0 under the physics of both "floor" and "character" actors.
  • OkyshoOkysho Member Posts: 158
    I don't think the actual velocity slows down. Because there's now approximately 40 pixels of unaccounted "slack" (I'm calling it) I think it's constantly switching between the fall animation (with an extra 40 px in length) and the normal size until the normal sized actor is 100% colliding with the ground. It's just happening really fast so it looks like he's slowing down. (velocity)

    I of course can't confirm this, it's speculation. That's just what I believe is happening...

    did that even make sense?
  • cbtcbt Member Posts: 644
    Yes it did lol :P

    Try this;

    -When self.motion.linear.velocity.Y > 0;
    *change self.width to XXX
    *change self.height to XXX

    Otherwise;
    *change self.width to YYY
    *change self.height to YYY

    If I had my mac anywhere near, I would test it before telling you.. But this is the best I can do for now :)
  • OkyshoOkysho Member Posts: 158
    I tried it out and that didn't work either... It actually messed a bit with my jumping animation. If I can't get it to work, the original way I had it will probably be alright, it just looks a little sloppy. )sorry for my long reply. My main actor has so many functions that it takes five to ten minutes to load the prototype editor for that actor)
  • cbtcbt Member Posts: 644
    Well.. Than the only thing left to do is to add an empty space of 30px to your character..

    You need to make all of the sequence the same size.. Just add empty space on photoshop (or some other) to the shorter images.. I think that will be the end of it! :D

    P.S: When I'm working with actors with a lot of rules, and, if I need to change and experiment on only a little part of it (like we do here) I make a copy of the actor (Hold "alt" and drag). And on that copy, I delete everything irrelevant to what I'm working on. And replace the original actor on the scene and experiment on that "light" one. (I sometimes even create an empty scene for that actor, so, everything is much faster..
  • OkyshoOkysho Member Posts: 158
    I didn't want to resort to that purely because my game is a megaman/metroid style shooter and with an extra 30px up the top won't make much sense in way of collision. I can with with the little extra hop he does at the end, it's not too bad. Thanks for all your help!

    P.S. I actually have a whole extra file for experimentation, I just don't import my animations into that file. Maybe I ought to start...
Sign In or Register to comment.