Frictional Games Forum (read-only)

Full Version: Sprint Questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all-

First off, is it possible to "disable sprint" and secondly, if the player is crouched, is it possible to kill them if they stand or sprint?
void SetPlayerRunSpeedMul(0);


Then just have a script area above the player so when he's crouching, he doesn't collide with it, then when he stands, he'll collide and set the player's health to 0. or give 100 damage
Oh, derp. Thats simple enough. Thanks Statyk. I almost forgot, +1 feedback for you good sir! Big Grin
(04-08-2012, 06:50 PM)JetlinerX Wrote: [ -> ]Hey all-

First off, is it possible to "disable sprint" and secondly, if the player is crouched, is it possible to kill them if they stand or sprint?
.
Ya'll prolly not need this, but maybe you will if you're going to put up a script if the player starts to sprint.
Then you could put up a timer that checks the player's speed. If the player's speed gets bigger than a certain amount, then something will happen.

void speedtimer(string &in asTimer)
{
AddTimer("speedtimer", 0.2f, "speedtimer");
if (GetPlayerSpeed() >=MAX_ALLOWED_SPEED )
{
SOMETHING HAPPENS
}
}






T'anks brah. =P

And Sorry, I missed that "or sprint". Could've cleared that up but Mackiiboy has it taken care of...