Jump
Posted: Wed May 09, 2007 2:20 pm
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;
}
} ]
}
[/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;
}
} ]
}