How do I make an actor jump

Modified: 2008/04/29 13:36 by VinayD - Categorized as: Game Creator, How To Guides
Edit

Make an actor jump

Basic Idea: Use the handy shortcut "run and jump by pressing keys (side view)". See notes below if you want to create this behavior from scratch.

Sample: http://www.popfly.com/users/team/HowDoI-Jump

Details:
  • Make sure the actor has a solid object to stand on. Other wise, actor will sink into the underground!

  • Click on the actor, then Behavior, and then select "run and jump by pressing keys (side view)" shortcut available at the top right of the Behavior dialog

Image

Jump (Click on the image for full size)


Details:
Defining a jump action requires a few steps.

  • Assign gravity: Create a down motion for the actor that starts at the game start and continues forever.

  • Change YDrag property of the actor to a small value, for example 0.3.

Image

Define YDrag


  • Define jump motion: Create an UP motion for the actor that uses 'Jump Velocity' value. Make sure you assign jump motion to key PRESS (default is WHILE KEY DOWN)
Image

Jump (Click on the image for full size)


Privacy. Terms of Use. Trademarks.
ScrewTurn Wiki version 2.0.22. Some of the icons created by FamFamFam.