Author Topic: Help with Handscript.  (Read 5225 times)

JeongWa

  • Autococker
  • Posts: 554
Help with Handscript.
« on: November 23, 2014, 11:12:32 AM »
Hey forum, i've been looking for an "auto switchhand" script for myself. I have asked fews players, we tried some things which is this:

(using azerty keyboard)

bind "D" "+moveright; hand 0"
bind "Q" "+moveleft; hand 1"
bind "S" "+back; hand 2"
bind "Z" "+forward; hand 2"

Has worked, but not for the strafe jump, probably because it can't work when pressing multiples binds with different orders. So.. the script was about :

MoveRight = Right Hand
MoveLeft = Left Hand
Move Forward = Mid Hand
Move Back = Mid Hand

But there is a problem, the strafe. So i would like to know.. if it was possible to make priorities on binds. And the idea would be to put in priority the Right/left Mouvement. So, whenever i press MoveRight + MoveForward/MoveBackword, the MoveRight bind must be the priority one. Same for the MoveLeft.

Or Maybe there is already someone using this script.
So let me know :)

ps: Don't bring the default AH script included in PCDP mod here. It is not working as i want.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Help with Handscript.
« Reply #1 on: November 23, 2014, 11:17:54 AM »
its not exactly possible to prioritize binds, but you can try this:

alias +rt "+moveright; hand 0"
alias -rt "-moveright; hand 2"
alias +lt "+moveleft; hand 1"
alias -lt "-moveleft; hand 2"

bind d "+rt"
bind q "+lt"
bind s "+back"
bind z "+forward"

edit: changed something, it didn't work the way I think it worked.
« Last Edit: November 23, 2014, 11:48:21 AM by xrichardx »

JeongWa

  • Autococker
  • Posts: 554
Re: Help with Handscript.
« Reply #2 on: November 23, 2014, 12:52:03 PM »
And what is the difference between this, and the previous ? By the way, it doesnt solve the problem, the strafe jump still a problem with the script. So if someone have any other idea, still open :) .

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Help with Handscript.
« Reply #3 on: November 23, 2014, 01:12:23 PM »
the difference is that when moving sideways and then forward, it will still have the weapon at the side, because moving forward and backward does not change the hand at all - which is what you requested.

pleasedeleteme

  • PGP
  • Posts: 9
Re: Help with Handscript.
« Reply #4 on: November 23, 2014, 01:26:14 PM »
I don't think what you're asking is possible.

JeongWa

  • Autococker
  • Posts: 554
Re: Help with Handscript.
« Reply #5 on: November 23, 2014, 01:32:59 PM »
Well, thanks xrichardx , it worked with the edit, even if sometime it does stay on the MidHand when i press Forward +Left/Right for some reaons. But thats what i wanted ! Exept this little bug , thanks man :)
So if we could solve thats, i'd be the happy =p .

ps: I noticed that this "thing" happens when you change you'r direction very fast (right to left, or left to right).

Clipz

  • Committee Member
  • Autococker
  • Posts: 1497
Re: Help with Handscript.
« Reply #6 on: November 23, 2014, 02:17:33 PM »
Sigh play the game real stop using scripts newbs :p

JeongWa

  • Autococker
  • Posts: 554
Re: Help with Handscript.
« Reply #7 on: November 23, 2014, 02:25:36 PM »
The whole game is a script, every time you press something, it's because it's binded, and i'm using manual switch since alot of time.. i want to change :)

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Help with Handscript.
« Reply #8 on: November 23, 2014, 02:38:28 PM »
Well, thanks xrichardx , it worked with the edit, even if sometime it does stay on the MidHand when i press Forward +Left/Right for some reaons. But thats what i wanted ! Exept this little bug , thanks man :)
So if we could solve thats, i'd be the happy =p .

ps: I noticed that this "thing" happens when you change you'r direction very fast (right to left, or left to right).

There is no such "bug". What you are experiencing is the thing that happens if you press down your left key before you release your right key. If that happens, the left key down will trigger hand left and then the right key up will trigger hand mid instantly afterwards, so you only see your hand in the middle. This may be solvable using waits. Try this:

alias "waits" "wait;wait;wait;wait"
alias +rt "+moveright; waits; hand 0"
alias -rt "-moveright; hand 2"
alias +lt "+moveleft; waits; hand 1"
alias -lt "-moveleft; hand 2"

bind d "+rt"
bind q "+lt"
bind s "+back"
bind z "+forward"

You will have to decide how many "wait"s you want to be executed in the first line. More will make the bug appear less often but they will also slightly lag the script.

JeongWa

  • Autococker
  • Posts: 554
Re: Help with Handscript.
« Reply #9 on: November 24, 2014, 07:38:45 AM »
You will have to decide how many "wait"s you want to be executed in the first line. More will make the bug appear less often but they will also slightly lag the script.
I tried with alots of  "wait" but it feel the same. Is there anything else we can do ?