Upvote Upvoted 0 Downvote Downvoted
Set alias after dying
posted in Customization
1
#1
0 Frags +

Script for reference :

//Viewmodeltoggle Script
alias SON "echo VMT loaded..."
alias SOFF "echo VMT unloaded..."

bind mwheelup nextinv
bind mwheeldown previnv
bind e prevwep

bind 1 QLslot1
bind 2 QLslot2
bind 3 QLslot3
alias QLslot1 W1
alias QLslot2 W2
alias QLslot3 W3

alias W1 "r_drawviewmodel 1;slot1;alias vmodel "r_drawviewmodel 0";MwheelAliase1;LInvAliase1"
alias W2 "r_drawviewmodel 1;slot2;alias vmodel "r_drawviewmodel 0";MwheelAliase2;LInvAliase2"
alias W3 "r_drawviewmodel 1;slot3;alias vmodel "r_drawviewmodel 1";MwheelAliase3;LInvAliase3"

alias MwheelAliase1 "alias nextinv W3;alias previnv W2"
alias MwheelAliase2 "alias nextinv W1;alias previnv W3"
alias MwheelAliase3 "alias nextinv W2;alias previnv W1"

alias LInvAliase1 "alias prevwep lastW1;alias lastW2 W1;alias lastW3 W1"
alias LInvAliase2 "alias prevwep lastW2;alias lastW1 W2;alias lastW3 W2"
alias LInvAliase3 "alias prevwep lastW3;alias lastW1 W3;alias lastW2 W3"

alias VMTlever VMToff
alias VMToff "SOFF;alias VMTlever VMTon;r_drawviewmodel 1;alias vmodel "r_drawviewmodel 1";alias QLslot1 slot1;alias QLslot2 slot2;alias QLslot3 slot3;bind e lastinv;bind mwheelup invprev;bind mwheeldown invnext"
alias VMTon "exec VMT"

W1;SON

//If not having the following aliases set in another .cfg uncomment them
//bind mouse1 +primary
//bind mouse2 +secondary
//alias +primary "+attack;spec_next;vmodel";bind mouse1 +primary
//alias -primary "-attack"
//alias +secondary "+attack2;spec_prev;vmodel";bind mouse2 +secondary
//alias -secondary "-attack2"

I want the alias W1 executed each time i die ingame (automatically of course and i am aware that i could press 1 aswell but its hard to remember everytime)
Suggestions are much appreciated.

Script for reference :
[code]//Viewmodeltoggle Script
alias SON "echo VMT loaded..."
alias SOFF "echo VMT unloaded..."

bind mwheelup nextinv
bind mwheeldown previnv
bind e prevwep

bind 1 QLslot1
bind 2 QLslot2
bind 3 QLslot3
alias QLslot1 W1
alias QLslot2 W2
alias QLslot3 W3

alias W1 "r_drawviewmodel 1;slot1;alias vmodel "r_drawviewmodel 0";MwheelAliase1;LInvAliase1"
alias W2 "r_drawviewmodel 1;slot2;alias vmodel "r_drawviewmodel 0";MwheelAliase2;LInvAliase2"
alias W3 "r_drawviewmodel 1;slot3;alias vmodel "r_drawviewmodel 1";MwheelAliase3;LInvAliase3"

alias MwheelAliase1 "alias nextinv W3;alias previnv W2"
alias MwheelAliase2 "alias nextinv W1;alias previnv W3"
alias MwheelAliase3 "alias nextinv W2;alias previnv W1"

alias LInvAliase1 "alias prevwep lastW1;alias lastW2 W1;alias lastW3 W1"
alias LInvAliase2 "alias prevwep lastW2;alias lastW1 W2;alias lastW3 W2"
alias LInvAliase3 "alias prevwep lastW3;alias lastW1 W3;alias lastW2 W3"

alias VMTlever VMToff
alias VMToff "SOFF;alias VMTlever VMTon;r_drawviewmodel 1;alias vmodel "r_drawviewmodel 1";alias QLslot1 slot1;alias QLslot2 slot2;alias QLslot3 slot3;bind e lastinv;bind mwheelup invprev;bind mwheeldown invnext"
alias VMTon "exec VMT"

W1;SON

//If not having the following aliases set in another .cfg uncomment them
//bind mouse1 +primary
//bind mouse2 +secondary
//alias +primary "+attack;spec_next;vmodel";bind mouse1 +primary
//alias -primary "-attack"
//alias +secondary "+attack2;spec_prev;vmodel";bind mouse2 +secondary
//alias -secondary "-attack2"[/code]

I want the alias W1 executed each time i die ingame (automatically of course and i am aware that i could press 1 aswell but its hard to remember everytime)
Suggestions are much appreciated.
2
#2
9 Frags +

Scripting cannot detect game state, and it cannot make conditional choices. The only thing that can interact with the script is your input.

If you'd like something to happen every time you die, you must hit a key every time you die.

Scripting cannot detect game state, and it cannot make conditional choices. The only thing that can interact with the script is your input.

If you'd like something to happen every time you die, you must hit a key every time you die.
3
#3
1 Frags +

it would be so nice to have viewmodels on when you are dead though :p

it would be so nice to have viewmodels on when you are dead though :p
Please sign in through STEAM to post a comment.