How to make a secondary jump when reaching max hight of first jump ?

cekuhnencekuhnen Member Posts: 7
edited February 2012 in Working with GS (Mac)
Hi

I would like to enable my character to be able to perform a secondary jump but that only when the character reaches nearly
the maximum hight of the first jump before the gravity force pulls the character down again.

Any idea how to calculate that?

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    edited February 2012
    how high can you actor jump at the first time?

    make an attribute actor jump pos(x and y) int

    when actor jumps, change attribute actorjumppos to actor's x and y

    when actor's y-35 is larger then actorjumpposx, then ...

    you can change the number you want

    Calvin
  • bazookaBenbazookaBen Member Posts: 318
    you could do:

    if jumping is true AND motion.velocity.y = 0

    jumping would be true if it's not touching the ground. In which case you have to make a ground actor as well.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Download this free demo, it has a section in it where fit shows you how to do jump/double jump and control its animation states accordingly. Theres lots of other super useful bits in too :)

    http://forums.gamesalad.com/discussion/38132/gs-tool-box-a-free-mega-template-ready-now
Sign In or Register to comment.