Raised This Month: $ Target: $400
 0% 

change player movements


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pillowCloud
Member
Join Date: Aug 2015
Location: AlliedModders
Old 10-03-2015 , 11:42   change player movements
Reply With Quote #1

I want to change player movements, for example:

If player is pressing W (move forward), then he will move backward,
and also for both right and left.

Thanks in advance
pillowCloud is offline
pillowCloud
Member
Join Date: Aug 2015
Location: AlliedModders
Old 10-15-2015 , 19:05   Re: change player movements
Reply With Quote #2

Is this possible?

Last edited by pillowCloud; 10-15-2015 at 19:06.
pillowCloud is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-15-2015 , 22:31   Re: change player movements
Reply With Quote #3

Most likely yes but why would anyone want to do that?
__________________
fysiks is online now
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-16-2015 , 09:03   Re: change player movements
Reply With Quote #4

Reverse-Motion grenade for example. :\
OciXCrom is offline
Send a message via Skype™ to OciXCrom
pillowCloud
Member
Join Date: Aug 2015
Location: AlliedModders
Old 10-17-2015 , 08:36   Re: change player movements
Reply With Quote #5

Well, this should be a part of a deathrun event,
just to make things more funnier.

I will be grateful for any help.

Last edited by pillowCloud; 10-17-2015 at 08:41.
pillowCloud is offline
vitorrossi
Senior Member
Join Date: Apr 2012
Location: NY, USA
Old 10-17-2015 , 15:17   Re: change player movements
Reply With Quote #6

You could hook pre-think and pev_buttons within this function. Then do a bit check (&) for IN_FORWARD, IN_BACK, IN_MOVERIGHT, IN_MOVELEFT and set_pev pev_buttons to the opposite of what player is pressing. Untested
vitorrossi is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-17-2015 , 23:08   Re: change player movements
Reply With Quote #7

Quote:
Originally Posted by vitorrossi View Post
You could hook pre-think and pev_buttons within this function. Then do a bit check (&) for IN_FORWARD, IN_BACK, IN_MOVERIGHT, IN_MOVELEFT and set_pev pev_buttons to the opposite of what player is pressing. Untested
I believe it's more efficient (or more proper) to use FM_CmdStart and not Prethink.
__________________
fysiks is online now
pillowCloud
Member
Join Date: Aug 2015
Location: AlliedModders
Old 10-22-2015 , 09:02   Re: change player movements
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
I believe it's more efficient (or more proper) to use FM_CmdStart and not Prethink.
Quote:
Originally Posted by vitorrossi View Post
You could hook pre-think and pev_buttons within this function. Then do a bit check (&) for IN_FORWARD, IN_BACK, IN_MOVERIGHT, IN_MOVELEFT and set_pev pev_buttons to the opposite of what player is pressing. Untested
not sure how to do this,
could i get a little example of this?
pillowCloud is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-22-2015 , 20:39   Re: change player movements
Reply With Quote #9

You can search for FM_CmdStart and the particular IN_* command constants (see hlsdk_const.inc for all the specific values). Other good keywords are pev_buttons and pev_oldbuttons (which you'll see these two stated in hlsdk_const.inc).
__________________
fysiks is online now
pillowCloud
Member
Join Date: Aug 2015
Location: AlliedModders
Old 11-05-2015 , 17:29   Re: change player movements
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
You can search for FM_CmdStart and the particular IN_* command constants (see hlsdk_const.inc for all the specific values). Other good keywords are pev_buttons and pev_oldbuttons (which you'll see these two stated in hlsdk_const.inc).
Thanks alot.
pillowCloud 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 00:47.


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