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
Script Help SetPlayerCrouching(true); not working while LShift is pressed
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#6
RE: SetPlayerCrouching(true); not working while LShift is pressed

(12-23-2015, 02:20 PM)Wili Wrote: I tried SetPlayerMoveSpeedMul(0.0); and SetPlayerRunSpeedMul(0); for disabling player controls but if the player keeps pressing Left Shift "SetPlayerCrouching(true);" won't work and the player will clip anyway.

Right because your just changing the speed of sprinting, your not stopping the player from sprinting.
There is any other way for disabling player controls?


SetPlayerActive(false); seems to work, it feels a bit odd because the player stops responding and the player can't look around anymore, but if there is no other way I could make it using that command.

Thanks a lot for the help Neelke!!!

Only a way to completely take away control,
void SetPlayerActive(bool abActive);
Looking through the code there sin't a way to straight up stop the player from sprinting, minus possibly taking away all control, then forcing them into a crouch, but my assumption is that that wouldn't stop them from being able to uncrouch. Maybe putting the crouch inside a looping timer that constantly forces them down into crouching? hmmm... I'd have to test it all on my end before knowing if that would 100% work, and you'd have to make sure to end that loop after they exited that area (or died) but thats a possibility.

I can't test it on my end but you could give that a go.

(This post was last modified: 12-23-2015, 09:34 PM by 7heDubz.)
12-23-2015, 09:33 PM
Find


Messages In This Thread
RE: SetPlayerCrouching(true); not working while LShift is pressed - by 7heDubz - 12-23-2015, 09:33 PM



Users browsing this thread: 1 Guest(s)