AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do you determine when someone is walking? (https://forums.alliedmods.net/showthread.php?t=6841)

Geesu 10-16-2004 14:00

How do you determine when someone is walking?
 
I know I can compare velocities, but this isn't 100%, is there a way to do this?

No you can't use get_user_button (I don't think)

XxAvalanchexX 10-16-2004 17:07

Check their maxspeed with get_user_maxspeed. If you consistently set it to 320 they can't walk, so I'm assuming it will lower the value by itself when they walk.

Johnny got his gun 10-16-2004 17:20

Maybe the buttons integer has a bit for walking after all. Did you compare its values for running and walking?

Geesu 10-16-2004 20:12

JGHG yes i did, and nothing...

I tried doing this a while ago and the only solution was to compare the velocities, but I really don't think it's smart to get the velocity and calculate if every client_prethink, would be much better to just find another way, I figured IN_RUN would be nice, but I have YET to see this even be activated.

the maxspeed thing wouldn't work

PM 10-17-2004 04:44

Ok.. I have checked the HLSdk cl_dll and it seems that the button is handled in the client internally. So there will probably be no other way of detecting it.


All times are GMT -4. The time now is 17:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.