The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limping Player
AKZEL Offline
Junior Member

Posts: 3
Threads: 3
Joined: Jan 2013
Reputation: 0
#1
Limping Player

So I'm trying to imitate a limp player in the beginning of my CS.
(will get healthy later, don't worry Big Grin)

The problem is that the bodyforce I'm applying is always negative Z (backward force), no matter if the player is walking forwards, backwards or strafing.

void OnStart()

{
    SetPlayerRunSpeedMul(0);    //Damaged player can't run
    SetPlayerMoveSpeedMul(0.8f);    //Damaged player moves slow
    AddTimer("T1", 0.1f, "BodyForce");

//===========LIMP=========================//
void BodyForce(string &in asTimer)
{
    
if ( GetPlayerSpeed() > 1 ){
    AddPlayerBodyForce(0, 0, -10000, true); //Pushes player backwards, resulting in a slight deceleration.
    AddDebugMessage("LIMP!", false);
    AddTimer("T3", 1.0f, "BodyForce");
}
else{
    AddTimer("T2", 0.1f, "BodyForce");
    AddDebugMessage("NO LIMP!", false);
}
}

Is there a way to get information about which direction the player is moving, or has someone else managed to script this effect without going full conversion..?

//AKZEL
(This post was last modified: 01-15-2013, 05:00 PM by AKZEL.)
01-15-2013, 04:59 PM
Website Find


Messages In This Thread
Limping Player - by AKZEL - 01-15-2013, 04:59 PM
RE: Limping Player - by TheGreatCthulhu - 01-15-2013, 05:19 PM
RE: Limping Player - by FlawlessHappiness - 01-15-2013, 05:27 PM
RE: Limping Player - by Kreekakon - 01-15-2013, 05:28 PM
RE: Limping Player - by TheGreatCthulhu - 01-15-2013, 08:31 PM
RE: Limping Player - by AKZEL - 01-16-2013, 12:38 AM



Users browsing this thread: 1 Guest(s)