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;
}
} ]
}
Jump
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
Pain is only psychological.