Page 1 of 1

Jump

Posted: Wed May 09, 2007 2:20 pm
by Masta_J
I have a scripted player, and I'm trying to add a jump order where the player stays in the air (fly's). So far, I can get the player to jump, but he doesn't float or return to his start order (in this case, "run player"). Instead, he keeps on bouncing in the same spot. Here's the code I added:

[/code]
Jump[()
{

ForceUp(FORCEUP*SCALE); // shoot the projectile (= do the damage)
}

if(self.animate_at_end) // check if the animation has finished
{
Gravity(false);
self.think="RunPlayer"; // go back to the basic routines
return 0;
}

} ]

}

Posted: Wed May 09, 2007 3:45 pm
by Juutis
Jump[()
{

ForceUp(FORCEUP*SCALE); // shoot the projectile (= do the damage)
} <- I don't think this is supposed to be here

if(self.animate_at_end) // check if the animation has finished
{
Gravity(false);
self.think="RunPlayer"; // go back to the basic routines
return 0;
}

} ]

} <- This neither

Posted: Fri May 11, 2007 1:08 pm
by Masta_J
Thanks alot man, got it working...