Upvote Upvoted 0 Downvote Downvoted
Alias in my config acting strangely
posted in Customization
1
#1
0 Frags +

Hey all,

I'm trying to brush up my Medic config and an alias'ed command isn't working the way I expect it to. It's based off of Chris' Config, and when copied directly, works as it should. Here are the parts I need, verbatim from Chris', that DO work:

//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
alias "+shiftmask" "bind "C" "maskuber""
alias "-shiftmask" "bind "C" "fakeuber""

//binds
bind "shift" "+shiftmask"

The above code, as written, requires me to push Shift+C to mask my uber. Since I will be using that command more often than a fake uber, I'd like to switch my maskuber to just being C and my fakeuber to be Shift+C. Logic dictates that I would just need to switch around the + and - for the shiftmasks so they correspond to the opposite configs, right? Well the following is the code where I try that, and it doesn't work.

//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
alias "-shiftmask" "bind "C" "maskuber""
alias "+shiftmask" "bind "C" "fakeuber""

//binds
bind "shift" "+shiftmask"

What happens with this script is that both C and Shift+C produce the fake uber call. I thought maybe switching the commands around might fix the problem, but apparently that isn't how hl2 reads configs because no combination of re-orders mattered.

Is there something I'm not understanding about aliases that is making this not work? I can't figure it out for the life of me - any explanation would be helpful.

Thanks so much!
--Lilith.

Hey all,

I'm trying to brush up my Medic config and an alias'ed command isn't working the way I expect it to. It's based off of [url=http://tf2wiki.net/wiki/Medic_scripts]Chris' Config[/url], and when copied directly, works as it should. Here are the parts I need, verbatim from Chris', that [b]DO[/b] work:

[code]
//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
alias "+shiftmask" "bind "C" "maskuber""
alias "-shiftmask" "bind "C" "fakeuber""

//binds
bind "shift" "+shiftmask"
[/code]

The above code, as written, requires me to push Shift+C to mask my uber. Since I will be using that command more often than a fake uber, I'd like to switch my maskuber to just being C and my fakeuber to be Shift+C. Logic dictates that I would just need to switch around the + and - for the shiftmasks so they correspond to the opposite configs, right? Well the following is the code where I try that, and it doesn't work.

[code]
//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
alias "-shiftmask" "bind "C" "maskuber""
alias "+shiftmask" "bind "C" "fakeuber""

//binds
bind "shift" "+shiftmask"
[/code]

What happens with this script is that both C and Shift+C produce the fake uber call. I thought maybe switching the commands around might fix the problem, but apparently that isn't how hl2 reads configs because no combination of re-orders mattered.

Is there something I'm not understanding about aliases that is making this not work? I can't figure it out for the life of me - any explanation would be helpful.

Thanks so much!
--Lilith.
2
#2
1 Frags +

haha no

//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
"bind "C" "maskuber""
alias "+shiftmask" "bind "C" "fakeuber""
alias "-shiftmask" "bind C maskuber""

//binds
bind "shift" "+shiftmask"

this should work if i understand correctly what you're going for

haha no
[code]//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
"bind "C" "maskuber""
alias "+shiftmask" "bind "C" "fakeuber""
alias "-shiftmask" "bind C maskuber""

//binds
bind "shift" "+shiftmask"[/code]
this should work if i understand correctly what you're going for
3
#3
0 Frags +

I feel like somehow the order of it all, and that there's no -shiftmask could have an impact, even though it shouldn't.

Instead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like

//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
alias "+shiftmask" "bind "C" "fakeuber""
alias "-shiftmask" "bind "C" "maskuber""

//binds
bind "shift" "+shiftmask"
I feel like somehow the order of it all, and that there's no -shiftmask could have an impact, even though it shouldn't.

Instead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like

[code]//Fake and Mask uber calls
alias "fakeuber" "voicemenu 1 7;say_team "*** KRITZ OR UBER FAKED ***""
alias "maskuber" "voicemenu 0 0;say_team "*** MASKED UBER CALL ***""

// Shift mask
alias "+shiftmask" "bind "C" "fakeuber""
alias "-shiftmask" "bind "C" "maskuber""

//binds
bind "shift" "+shiftmask"[/code]
4
#4
0 Frags +

Why dont you just bind maskuber to shift and faceuber to c? This way you don't have to worry about aliases and only have to press one button at a time.

This script looks really messed up by the way, too many quotes and binds within aliases, this might work better:

bind c "ubercalls"
alias ubercalls "maskuber"
alias maskuber "voicemenu 2 5; say_team *** MASKED UBER CALL ***"
alias fakeuber "voicemenu 1 7; say_team *** KRITZ OR UBER FAKED ***"

bind shift "+shiftmask"
alias +shiftmask "alias ubercalls fakeuber"
alias -shiftmask "alias ubercalls maskuber"

I also changed the voicebind for masking uber, seeing as the "MEDIC" one is pretty loud and can be easily heard.

Why dont you just bind maskuber to shift and faceuber to c? This way you don't have to worry about aliases and only have to press one button at a time.

This script looks really messed up by the way, too many quotes and binds within aliases, this might work better:

[code]bind c "ubercalls"
alias ubercalls "maskuber"
alias maskuber "voicemenu 2 5; say_team *** MASKED UBER CALL ***"
alias fakeuber "voicemenu 1 7; say_team *** KRITZ OR UBER FAKED ***"

bind shift "+shiftmask"
alias +shiftmask "alias ubercalls fakeuber"
alias -shiftmask "alias ubercalls maskuber"[/code]

I also changed the voicebind for masking uber, seeing as the "MEDIC" one is pretty loud and can be easily heard.
5
#5
0 Frags +
rowrowInstead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like

Much to both our surprise, that STILL didn't work, even though it logically and grammatically should. However, with this same idea, I just re-designed what fakeuber and maskuber do - so now maskuber functions like how fakeuber should, and fakeuber functions how maskuber should. It'll be confusing as hell when I come back to it in a few months to brush things up, but at least it's working the way I need it to, I guess.

If anyone knows why this isn't working appropriately, though, your insight is still greatly appreciated! I'm nerd-sniped to hell on this and it's bugging me to no end.

And thanks to everyone for all your help!!

[quote=rowrow]Instead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like
[/quote]

Much to both our surprise, that STILL didn't work, even though it logically and grammatically should. However, with this same idea, I just re-designed what fakeuber and maskuber do - so now maskuber functions like how fakeuber should, and fakeuber functions how maskuber should. It'll be confusing as hell when I come back to it in a few months to brush things up, but at least it's working the way I need it to, I guess.

If anyone knows why this isn't working appropriately, though, your insight is still greatly appreciated! I'm nerd-sniped to hell on this and it's bugging me to no end.

And thanks to everyone for all your help!!
6
#6
0 Frags +
KayleeSeranadarowrowInstead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like
Much to both our surprise, that STILL didn't work, even though it logically and grammatically should. However, with this same idea, I just re-designed what fakeuber and maskuber do - so now maskuber functions like how fakeuber should, and fakeuber functions how maskuber should. It'll be confusing as hell when I come back to it in a few months to brush things up, but at least it's working the way I need it to, I guess.

If anyone knows why this isn't working appropriately, though, your insight is still greatly appreciated! I'm nerd-sniped to hell on this and it's bugging me to no end.

And thanks to everyone for all your help!!

using my previous code, C is default bound to masking your uber
if you press shift it unbinds it from masking and rebinds it to fake uber
once you're done pressing shift it will rebind it to maskuber

[quote=KayleeSeranada][quote=rowrow]Instead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like
[/quote]

Much to both our surprise, that STILL didn't work, even though it logically and grammatically should. However, with this same idea, I just re-designed what fakeuber and maskuber do - so now maskuber functions like how fakeuber should, and fakeuber functions how maskuber should. It'll be confusing as hell when I come back to it in a few months to brush things up, but at least it's working the way I need it to, I guess.

If anyone knows why this isn't working appropriately, though, your insight is still greatly appreciated! I'm nerd-sniped to hell on this and it's bugging me to no end.

And thanks to everyone for all your help!![/quote]

using my previous code, C is default bound to masking your uber
if you press shift it unbinds it from masking and rebinds it to fake uber
once you're done pressing shift it will rebind it to maskuber
7
#7
0 Frags +
jake_desKayleeSeranadarowrowInstead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like
Much to both our surprise, that STILL didn't work, even though it logically and grammatically should. However, with this same idea, I just re-designed what fakeuber and maskuber do - so now maskuber functions like how fakeuber should, and fakeuber functions how maskuber should. It'll be confusing as hell when I come back to it in a few months to brush things up, but at least it's working the way I need it to, I guess.

If anyone knows why this isn't working appropriately, though, your insight is still greatly appreciated! I'm nerd-sniped to hell on this and it's bugging me to no end.

And thanks to everyone for all your help!!

using my previous code, C is default bound to masking your uber
if you press shift it unbinds it from masking and rebinds it to fake uber
once you're done pressing shift it will rebind it to maskuber

It didn't work that way, though. For some reason, it just performed fakeuber whether shift was pressed or not.

[quote=jake_des][quote=KayleeSeranada][quote=rowrow]Instead of changing the alias +/-, just change the maskuber fakeuber after bind C to look like
[/quote]

Much to both our surprise, that STILL didn't work, even though it logically and grammatically should. However, with this same idea, I just re-designed what fakeuber and maskuber do - so now maskuber functions like how fakeuber should, and fakeuber functions how maskuber should. It'll be confusing as hell when I come back to it in a few months to brush things up, but at least it's working the way I need it to, I guess.

If anyone knows why this isn't working appropriately, though, your insight is still greatly appreciated! I'm nerd-sniped to hell on this and it's bugging me to no end.

And thanks to everyone for all your help!![/quote]

using my previous code, C is default bound to masking your uber
if you press shift it unbinds it from masking and rebinds it to fake uber
once you're done pressing shift it will rebind it to maskuber[/quote]

It didn't work that way, though. For some reason, it just performed fakeuber whether shift was pressed or not.
8
#8
0 Frags +

Something this simple shouldn't be hard to edit, so my guess is that you have something else on some other file conflicting. Try not to use the custom folder for config purposes, use just the cfg folder and check if you got something on your autoexec that could interfere.
I'm just talking out of my ass since you didn't mention anything about file locations though so, sorry if my post is useless.

Something this simple shouldn't be hard to edit, so my guess is that you have something else on some other file conflicting. Try not to use the custom folder for config purposes, use just the cfg folder and check if you got something on your autoexec that could interfere.
I'm just talking out of my ass since you didn't mention anything about file locations though so, sorry if my post is useless.
Please sign in through STEAM to post a comment.