How can I make my character scunch his legs down when he jumps or lands ?

bladeolsonbladeolson Member Posts: 295
edited November -1 in Working with GS (Mac)
I have been able to get my guy to jump in my game but he is super stiff leg man. When I press the "jump" button, obviously I want him to bend his legs a bit with an animation then jump up. As he lands, I would like the reverse to happen. I was playing with "collide" but can't seem to find a way to make him animate on a collide. Thanks for any ideas....

Blade

Comments

  • iDeveloperziDeveloperz Member Posts: 1,169
    Create a rule where if he collides with the floor and jump = 1 start animation.

    And then create an attribute jump. (Integer should do the job).

    Also in your jump rule (to make the actor jump), add a change attribute for (time taken to jump) seconds game.jump to game.jump+1.

    Sorry that I cant be of much help.
  • design219design219 Member Posts: 2,273
    My game has a jump with a single frame animation of the chef's legs getting shorter and his hand moving just a little. I used a very slight timer delay to play the animation and then execute the acceleration for the jump. It is a very stylized graphic style so it works fine.

    If you have an iPhone you can see it in action here (it's free):
    http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
  • rebumprebump Member Posts: 1,058
    If you don't want to animate the action (the preferred way), you can fake it with a simple resizing/repositioning of the actor. Shrink in the Y dimension say 4 pixels while also moving the Y position downward by half the shrink size (to keep the actor on the ground).

    Now this won't miraculously give your actor swinging arms or scrunching legs, but it works with simple actors such as squares, springs, balls, etc.

    Although, after mentioning ball, you may want to add a third action of widening the actor by a few pixels too for a sort of splat effect before bounding upward.

    Upon launching, you can then undo those actions and even add more (like elongate in the Y while in upward Y velocity or slanting/rotating one way upon launching and another way upon landing).

    Upon landing, repeat.

    Just some ideas to screw around with.

    Tip: These types of actions work great for emulating button presses if you want to do more than just highlight during a button press. Saves the hassle of making a button press animation.
  • bladeolsonbladeolson Member Posts: 295
    Thanks Guys, I got it working now. Looks pretty cool. Hopefully I have something I can show to the world soon.
Sign In or Register to comment.