Jump system

Talk about making games.

Jump system

Postby deek » Fri Jan 05, 2007 4:21 am

As a keydown event with no repeat

Code: Select all
velocity>-8) {yvelocity=-8;}
    if (yvelocity>-8){yvelocity=yvelocity-8;}
    if (animindex==2 | animindex==4 | animindex==6){ChangeAnimation("Event Actor", " your jump right animation ", FORWARD);}
    if (animindex==1 | animindex==3 | animindex==5){ChangeAnimation("Event Actor", "your jump left animation ", FORWARD);}
 




A keydown event with a repeat:

Code: Select all
    if (animindex==2 | animindex==4 | animindex==6){ChangeAnimation("Event Actor", " your jump right animation ", FORWARD);}
    if (animindex==1 | animindex==3 | animindex==5){ChangeAnimation("Event Actor", " your jump left animation ", FORWARD);}
 



A keyup event:

Code: Select all
{
    Jump = 0;
    switch (animindex){
        case 4 : ChangeAnimation("Event Actor", "your stop right animation", FORWARD); break;
        case 5 : ChangeAnimation("Event Actor", " your stop left animation ", FORWARD); break;
                      }
           }





change the animindex to the to suit your actor
deek
 
Posts: 48
Joined: Wed Dec 20, 2006 6:52 am
Score: 0 Give a positive score

Postby deek » Fri Jan 05, 2007 4:28 am

the animindex is the order in which your animations
run. In your actor control shows the order of you
animations.

the first animindex should be you jump right, second is move
right and third is stop right.

the second row should be left animations.

Hope this helps, and tell me how it goes
deek
 
Posts: 48
Joined: Wed Dec 20, 2006 6:52 am
Score: 0 Give a positive score

Postby Game A Gogo » Fri Jan 05, 2007 10:43 pm

AHA, that wound of work in that time, ive used multiple jumping animation (just like in megaman) like in mid air etc, it was depending on the direction and on the velocity.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest