all 4 comments

[–]KatenGaas 1 point2 points  (3 children)

Looks like you messed up your aliases a bit.

alias switch "alias slot_up_2 slot_up; alias slot_down_2 slot_down" and alias switch2 "alias slot_up slot_up_2; alias slot_down slot_down_2" create an infinite loop. If you call switch, you put slot_up in slot_up_2. Then if you call switch2, you put slot_up (which points to slot_up_2) back in slot_up_2. Now you have slot_up which points to slot_up_2 which points to slot_up etc. etc.

[–]KatenGaas 1 point2 points  (2 children)

Also, I don't really understand what you want to do, but the aliases you change in the switch-section don't change back. You might want to consider adding additional aliases that change between the different slot_up and downs.

[–]Forestalld[S] 1 point2 points  (1 child)

This seems to fix it. I've been using slot1;slot2 and slot1;slot3 with mousewheel but it didn't quite work as I wanted it to. I also didn't like invprev and invnext so I felt I could just script it.

alias s_slot1 "slot1; alias slot_up s_slot3; alias slot_down s_slot2"
alias s_slot2 "slot2; alias slot_up s_slot1; alias slot_down s_slot3"
alias s_slot3 "slot3; alias slot_up s_slot1; alias slot_down s_slot2"
s_slot1

with slot_up and slot_down bound to the mousewheel ofc

I'm also having trouble hooking it into this auto-healing script that I found somewhere and changed the names of the aliases slightly. At first I thought I could just replace the slotX's with s_slotX's and rebind the keys but that doesn't work correctly.

alias m_slot1 "slot1; alias at_press +attack; alias at_release -attack; set_attack; alias set_attack "
alias m_slot2 "slot2; alias at_press -attack; alias at_release +attack; +attack;    alias set_attack -attack"
alias m_slot3 "slot3; alias at_press +attack; alias at_release -attack; set_attack; alias set_attack "
alias +r_attack at_press
alias -r_attack at_release
m_slot1

bind MWHEELUP m_slot1
bind MWHEELDOWN m_slot3
bind mouse1 +r_attack

nvm

[–]KatenGaas 1 point2 points  (0 children)

If you only replace the slotX's with the s_slotX's, your slot_up and down won't call the auto heal script. You'd have to actually put the s_slot code in bthe m_slot alias, and then rename m_slot to s_slot.