test content
What is the Arc Client?
Install Arc

Need help w/Keybind pls

Archived PostArchived Post Posts: 1,156,071 Arc User
edited February 2012 in Controls and Interface
I've read thru Zvardin's excellent post (stickied at the top of this forum) about keybinds, but I'm evidently not doing it right.

I want to bind the "b" key to activate the 5th of my toon's power slots, then switch his costume to the 2nd one listed.

I want to bind the "n" key to activate the 5th of my toons power slots, then switch his costume to the 1st one listed.

I created the textfile "donnarxform.txt", which contains the following:


b "+PowerTrayExec <slot 4>$$ setactivecostume 0 1"
n "+PowerTrayExec <slot 4>$$ setactivecostume 0 0"


after saving this file in the live folder on my PC and launching the game; I typed into the chat window:


/bind_load_file <donnarxform.txt>


Nothing at all changed. The "b" key still bring up the build screen, and the "n" key doesn't do anything.

Can someone tell me where I went wrong?

Thanks;

Matt
Post edited by Archived Post on

Comments

  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited January 2012
    Going from my (limited) knowledge of the keybinds and my terrible memory...

    First, you need to clear the current keybind for B, since it's assigned to the build menu. Go into the Keybinds tab in the options menu and clear it.

    Second, this; b "+PowerTrayExec <slot 4>$$ setactivecostume 0 1"
    ...should really looks like this; b"+PowerTrayExec 4 $$ setactivecostume 0 1"
    and also I'm positive I'm missing something here...it'll come back to me eventually.


    Knowing me I've probably told you how to make the world explode with one button. :D I'm tired so I'm only partially helpful, sorry,
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited January 2012
    Tried the above, but nothing changed.
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited January 2012
    cynlover01 wrote:
    Tried the above, but nothing changed.

    This is the exact line you want in notepad:

    B "PowerTrayExec 1 5 $$ setactivecostume 1 7 $$ powerhue 0 360"

    Now the variables you WILL want to change are the 5, the 7, and the 360.

    I believe the powers actually start at 0 and are off by one so you might need to change the 5 to a 4 to work the right one. It's been awile since I used the default so I forget. The 7 is the costume slot you want and again...these start at 0 and not 1. Finally I added in a change color for all powers (only all sorry) and the number 360 is the color variable. You can experiment with lower numbers for colors if you like (360 is max) or just remove that part completely.

    Hope that helps.
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited January 2012
    Reading your post again, I think this is what you want:

    B "PowerTrayExec 1 4 $$ setactivecostume 1 1 $$ powerhue 0 360"
    N "PowerTrayExec 1 4 $$ setactivecostume 1 0 $$ powerhue 0 360"

    Again, I put a "4" because I think they are off by one.
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited February 2012
    This was in the thread created by Zvardin. I would save it somewhere just for future reference:

    Power Tray
    This shows what slot is which #:

    | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 |
    | 16 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 14 |



    Now, onto your situation. In order to get the result you are looking for exactly as you asked, copy and paste the following into your file named "donnarxform.txt":

    B +PowerTrayExec 4 $$ +setactivecostume 2
    N +PowerTrayExec 4 $$ +setactivecostume 1


    **The only thing I am not entirely sure about is the number for the setactivecostume, because if that starts with "0" as well, then the code below would work instead:

    B +PowerTrayExec 4 $$ +setactivecostume 1
    N +PowerTrayExec 4 $$ +setactivecostume 0



    Now, if you wanted the same button to do both, rather than need two different buttons for each, you could go with this method instead:

    You will need two txt files and you can name them whatever you'd like... in this case I am going to call them "CostumeA.txt" and "CostumeB.txt"


    CostumeA.txt will look like this:

    B +PowerTrayExec 4 $$ +setactivecostume 1 $$ bind_load_file CostumeB.txt

    AND

    CostumeB.txt will look like this:

    B +PowerTrayExec 4 $$ +setactivecostume 0 $$ bind_load_file CostumeA.txt


    Now, all you have to do is bind_load_file CostumeA.txt (or CostumeB.txt as it doesn't matter as ti will auto load the other file once you press "B")

    And now when you press "B" it will do one, and if you press "B" again, it will do the other and so on so forth.

    I hope this helps/helped you out.

    Sincerely,

    Villovolt
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited February 2012
    Rezz000's info should work and he copied over the power locations (yeah they start at 0 just like costumes) . Just a quick note that for my binds, I do them like I wrote them.

    I use quotes, no plus symbols, and a 0 or 1 before the second actual number. They work for me so if you're having trouble, try that method too.
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited February 2012
    Rezz000 wrote:
    Now, if you wanted the same button to do both, rather than need two different buttons for each, you could go with this method instead:

    Thanks very much for your help; I ran into 2 issues w/this:

    1) the script works to activate the power and switch to the 2nd costume slot, but pressing the button again doesn't switch to the first costume slot; it switches to the same (2nd) slot again. (I know it's doing this because each time I press the button, I get the message "You cannot change your costune again yet", whether there's any visible change or not). I get the same result whether the text files are telling the program to alternate between slots 1 & 2, or between slots 0 & 1. It will switch to the 2nd costume slot, but not away from it. I have copied/pasted the exact contents of both files below.

    2) The costume change takes place before the power activation animation completes, which just looks wrong. Is there any way to build in a delay(say, about 1.5 sec) to give the animation time to complete before the costume switches?

    As always, any assistance is appreciated.

    Matt



    costumea.txt says: N +PowerTrayExec 4 $$ +setactivecostume 1 $$ bind_load_file costumeb.txt


    costumeb.txt says: N +PowerTrayExec 4 $$ +setactivecostume 2 $$ bind_load_file costumea.txt
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited February 2012
    Because of the way costume changes work (it requires a decent amount of delay in between switching), the second way of making it one button is not a good idea.

    The reason is because once you press the button, whether it is able to make the costume change or not, it will switch it to the opposite command.

    This means that you press the button once, it loads costume 2. You press it a second time, it tries to load costume 1 but can't... but it will still switch commands so that the next time you press the button, it is to call costume 2 again.


    So it is better just to keep them on separate buttons so just go with this code and you will have what you originally wanted:

    B +PowerTrayExec 4 $$ +setactivecostume 1
    N +PowerTrayExec 4 $$ +setactivecostume 0



    As far as a timer, or delay before execution, this doesn't seem possible with ordinary keybinding. So unfortunately, I do not have a solution to that issue for you.

    Good luck,

    Villovolt
  • Archived PostArchived Post Posts: 1,156,071 Arc User
    edited February 2012
    I suggest using a program like AutoHotkey. It really makes doing things like this much, much easier.

    For example you could write a script and bind it to a key that will press 5 to activate the power, wait 1 second, and then press another key you have programmed to switch your costume.

    Simple binds in CO are fine. But anything more than that and it quickly becomes a headache.
Sign In or Register to comment.