BriGhtx3 Posted September 5, 2012 Posted September 5, 2012 Hey, always when I set the control state to crouched then the player crouches for a second and immediately stands up again. I want the player to always walk crouched and disable sprinting and walking when he is standing: toggleControl("jump",false) toggleControl("sprint",false) toggleControl("walk",false) setControlState("crouch",true) Why doesn't this work? It is in a function and clientside
BriGhtx3 Posted September 5, 2012 Author Posted September 5, 2012 I already posted my code. And Im not that dump to make mistakes in the meta. As you see the player already gets crouched but he stands up immediately.
DiSaMe Posted September 5, 2012 Posted September 5, 2012 You need to set crouching control state to false after a short delay, so that it would be like pressing crouching button instead of holding it down.
Jaysds1 Posted September 5, 2012 Posted September 5, 2012 (edited) try this: toggleControl("walk",false) toggleControl("sprint",false) toggleControl("jump",false) setControlState("crouch",true) setTimer(setControlState,1000,1,"crouch",false) Edited September 5, 2012 by Guest
Anderl Posted September 5, 2012 Posted September 5, 2012 try this:toggleControl("walk",false) toggleControl("sprint",false) toggleControl("jump",false) setControlState("crouch",true) setTimer(setControlState,1000,1,"crouch",true) That'll do the same. As CrystalMV said, it should be set as false after a short time..
BriGhtx3 Posted September 6, 2012 Author Posted September 6, 2012 (edited) Works now I set delay to 100. Thank you Edited September 10, 2012 by Guest
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now