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
Script Help SetPlayerCrouching(true); not working while LShift is pressed
Wili Offline
Junior Member

Posts: 5
Threads: 1
Joined: Dec 2015
Reputation: 0
#1
SetPlayerCrouching(true); not working while LShift is pressed

Hi, I'm trying to make the player force crouch using "SetPlayerCrouching(true);"

It works if the player is walking but if the player keeps running pressing Left Shift button when "SetPlayerCrouching(true);" command is called the player won't crouch.

There is any way to send "Left Shift" key to the game so I can release "Left Shift" key just before "SetPlayerCrouching(true);" command is sent?

I tried this with the same result:

SetPlayerMoveSpeedMul(0.0);
SetPlayerRunSpeedMul(0);

If the player keeps pressing "Left Shift" the player won't crouch anyway, even if the player is not moving at all.

Any ideas?

Thank you in advance!
12-23-2015, 12:58 PM
Find


Messages In This Thread
SetPlayerCrouching(true); not working while LShift is pressed - by Wili - 12-23-2015, 12:58 PM



Users browsing this thread: 1 Guest(s)