Raised This Month: $51 Target: $400
 12% 

How do I determine if someone is walking?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 04-01-2004 , 11:28   How do I determine if someone is walking?
Reply With Quote #1

I currently use the get_user_velocity function and just know they're walking if it's below a certain value, but this isn't 100%. Is there a way to detect when they press the key that makes them walk? Beacuse the get_user_button doesn't have the shift key (walk key).

Thanks,
Josh
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-01-2004 , 11:52  
Reply With Quote #2

in 0.2 there will be a way (something like Vexd's ButtonPressed forward)
__________________
hello, i am pm
PM is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 04-01-2004 , 12:09  
Reply With Quote #3

Thanks,
josh
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-01-2004 , 12:14  
Reply With Quote #4

This should work
Code:
if (!get_user_button(id)&IN_RUN) {//player is walking //UR CODE HERE }
__________________
My Plugins

Got ??
AssKicR is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 04-01-2004 , 12:22  
Reply With Quote #5

That could mean any button though.
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-01-2004 , 12:33  
Reply With Quote #6

NO... IN_RUN is only cancelled when you use WALK key (default SHIFT) i think
__________________
My Plugins

Got ??
AssKicR is offline
BAILOPAN
Join Date: Jan 2004
Old 04-01-2004 , 12:54  
Reply With Quote #7

Quote:
Originally Posted by AssKicR
NO
AssKicr asserts himself ;]

most likely here is how I'll do it... I'll catch any buttons being pressed in PreThink(edict) and if it's a player, forward it.
__________________
egg
BAILOPAN is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 04-01-2004 , 12:56  
Reply With Quote #8

I posted this same question on amxmod's forums about 6 mo. ago, and the !IN_RUN didn't work
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-01-2004 , 14:33  
Reply With Quote #9

Don't do !IN_RUN... Just IN_RUN
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-01-2004 , 14:45  
Reply With Quote #10

@pimp_daddy... At least try my code before ya say that it doesn't work!!!!
__________________
My Plugins

Got ??
AssKicR is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:28.


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