+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: Is it possible to bind "dropweapon", "droppowerup", "dropflag" on one key ?

  1. #11
    Junior Member RaDe0N is on a distinguished road
    Join Date
    Aug 2010
    Posts
    11
    Well I'm trying to do a strafe script for evading LG, because I really really hate to deal with LG against me My idea was instead of normal strafing -> a, d, a, d to pump up only one key like z for instance, so in order to work I need when z is pressed for the first time to go a bit to the left, when pressed 2nd time to go to the right and when pressed 3rd time to go left again and so on. Here I think 'wait' will be a disaster.

    Ok I did it like this:

    bind z "vstr z1"
    set z1 "-moveright;+moveleft;bind z vstr z2"
    set z2 "-moveleft;+moveright;bind z vstr z1"

    And it's working but with the unfortunate 'bonus' that when I stop pumping 'z' I'm stuck at the last direction i.e. left or right no matter what I do except manually to write in the console -moveright/-moveleft accordingly, any suggestion to fix this? How could "bind a +moveleft" invoke +cmd and -cmd but when we have vstr as addition to the bind -cmd got omitted?
    Last edited by RaDe0N; 02-20-2013 at 04:35 AM.

  2. #12
    Senior Member Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa's Avatar
    Join Date
    Aug 2010
    Location
    Kepler-22b
    Posts
    8,380
    Quote Originally Posted by RaDe0N View Post
    Well I'm trying to do a strafe script for evading LG, because I really really hate to deal with LG against me My idea was instead of normal strafing -> a, d, a, d to pump up only one key like z for instance, so in order to work I need when z is pressed for the first time to go a bit to the left, when pressed 2nd time to go to the right and when pressed 3rd time to go left again and so on.
    Using two fingers to alternate between two keys allows you to alternate more quickly than pressing a single key.

    Here I think 'wait' will be a disaster.
    It probably will, but in my experience a + almost invariably needs to be separated by at least one wait before a - otherwise the whole thing simply gets ignored. Actually this makes sense when I think about it, if each command takes place in a single gametic, and there are two gametics per frame, a + and - would be issued within a single frame so the result would be nothing.

    Perhaps one wait will not be too detrimental, it is only 4 ms.

    Ok I did it like this:

    bind z "vstr z1"
    set z1 "-moveright;+moveleft;bind z vstr z2"
    set z2 "-moveleft;+moveright;bind z vstr z1"

    And it's working but with the unfortunate 'bonus' that when I stop pumping 'z' I'm stuck at the last direction i.e. left or right no matter what I do except manually to write in the console -moveright/-moveleft accordingly, any suggestion to fix this?
    This is exactly what I would expect to happen since your sets end in a +command.

    How could "bind a +moveleft" invoke +cmd and -cmd but when we have vstr as addition to the bind -cmd got omitted?
    Maybe it's too early in the morning but I didn't understand this question at all :-/

    I was able to strafe left in tiny jumps with this:

    set z1 "+moveleft ; wait 5 ; -moveleft"
    bind z "vstr z1"

    A small number of waits should be ok. I didn't notice any disruption when hitting a bunch of keys as well as mashing z.

    I made a small "dodger" script like this:

    set z1 "+moveleft ; wait 10 ; -moveleft ; bind z vstr z2"
    set z2 "+moveright ; wait 10 ; -moveright ; bind z vstr z1"
    bind z "vstr z1"

    Again wait 10 did not appear to be disruptive, however the strafes are still quite short.

    I can't tell you how uncomfortable this is for me compared to normal dodging with the strafe keys :-P

  3. #13
    Junior Member RaDe0N is on a distinguished road
    Join Date
    Aug 2010
    Posts
    11
    bind z "vstr z1"
    set z1 "-moveright;+moveleft;bind z vstr z2"
    set z2 "-moveleft;+moveright;bind z vstr z1"

    This way the duration of holding down the z key controls the moved distance -> longer I hold it longer it will go, so it's not so automated compered with wait 10.

    I have misunderstood your earlier posts about wait, I though that wait 125 is the absolute minimum possible in online game, I'll try out with lower values now.

  4. #14
    Senior Member Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa's Avatar
    Join Date
    Aug 2010
    Location
    Kepler-22b
    Posts
    8,380
    Quote Originally Posted by RaDe0N View Post
    bind z "vstr z1"
    set z1 "-moveright;+moveleft;bind z vstr z2"
    set z2 "-moveleft;+moveright;bind z vstr z1"

    This way the duration of holding down the z key controls the moved distance -> longer I hold it longer it will go, so it's not so automated compered with wait 10.
    Interesting. In that case maybe you should use alias and do something like:

    alias +mr "+moveright"
    alias -mr "-moveright ; bind z +mL"

    alias +mL "+moveleft"
    alias -mL "-moveleft ; bind z +mr"

    bind z "+mr"

    I have misunderstood your earlier posts about wait, I though that wait 125 is the absolute minimum possible in online game, I'll try out with lower values now.
    You can use any value of wait in any game :-)

    Just 'wait' or 'wait 1' being the smallest value, which waits one gametic of which there are two per frame, so at 125 frames/sec you have 250 gametics/sec.

    You can even do something like 'wait 99999999' but don't do that unless you want to have to force close QL :-P

  5. #15
    Senior Member pikaluva13 will become famous soon enough pikaluva13's Avatar
    Join Date
    Aug 2010
    Location
    East Lansing, MI
    Posts
    6,206
    Quote Originally Posted by RaDe0N View Post
    Well I'm trying to do a strafe script for evading LG, because I really really hate to deal with LG against me
    You do realize that a script will make you even easier to hit with lg, right? Your pattern will be much more predictable.

  6. #16
    Junior Member RaDe0N is on a distinguished road
    Join Date
    Aug 2010
    Posts
    11
    Thank you Lorfa the alias script is perfect.
    Btw it was interesting the difference between alias solution and mine with vstr upwards, whit 'alias' when I hold z I continue to walk in the the specified direction for the time the button was pressed, but in the vstr script, when I hold the key the player shivers because of the continuous change in positions, unfortunately this shivering is whit very little amplitude and is not effective strafe at all, in the vstr solution the duration of the walking was determined from 1 pressing of the key till the next one i.e. press z1-release-walk left-press z2-release-walk right.
    You do realize that a script will make you even easier to hit with lg, right? Your pattern will be much more predictable.
    Yes I know that, but the alias thingy is still very useful for a long distance rail fight, and for LG, now I'm thinking of more complex evasion maneuvers with vstr and small values of wait (and hope I'll be able to fire Lg continuously in the same time ). Or probably some strafing with mouse scroll and/or sensitivity control with mouse scroll - will it be possible some iteration change like sens 0.5, sens 0.6, sens 0.7 and then down the way again, how do you think?
    Last edited by RaDe0N; 02-23-2013 at 06:14 AM.

  7. #17
    Senior Member Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa is a jewel in the rough Lorfa's Avatar
    Join Date
    Aug 2010
    Location
    Kepler-22b
    Posts
    8,380
    Unfortunately there is no iteration function in QL script, so you'd have to manually build a list of values ala:

    bind mwheelup "vstr s2"
    bind mwheeldown "vstr s0"

    set s0 "sens 0.5 ; bind mwheelup vstr s1 ; bind mwheeldown vstr s0"
    set s1 "sens 0.6 ; bind mwheelup vstr s2 ; bind mwheeldown vstr s1"
    set s2.. etc.

    Actually when you get to the "ends" with the lowest or highest sens you want to go you'll have to just have it repeat the same value for wheelup and wheeldown respectively.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts