Forums » General
Toggle keys
There are a number of commands that toggle (example flightmode, framerate, etc.). But it's hard to do this with aliases since you need two aliases and they must refer to the key that is bound to them (since aliases that change themselves crash the game). Is there an easier way to do this?
/alias et1 "alias EvadeToggle EvadeOff"
/alias et2 "alias EvadeToggle EvadeOn"
/alias EvadeOn "load evade.cfg; et1"
/alias EvadeOff "load nonevade.cfg; et2"
/alias EvadeToggle "EvadeOn"
not entirely sure if that will work, i did a similar thing and it didnt. But it works in CS, and i have noticed that Vendetta scripting is very similar to cs scripting (THANK YOU DEVS, YOU ARE A GODSEND! I LOVE YOU FOR THAT :D)
/alias et2 "alias EvadeToggle EvadeOn"
/alias EvadeOn "load evade.cfg; et1"
/alias EvadeOff "load nonevade.cfg; et2"
/alias EvadeToggle "EvadeOn"
not entirely sure if that will work, i did a similar thing and it didnt. But it works in CS, and i have noticed that Vendetta scripting is very similar to cs scripting (THANK YOU DEVS, YOU ARE A GODSEND! I LOVE YOU FOR THAT :D)
Leqiator, this will crash the game.
When you /EvadeToggle it will evadeOn and there fore et1 which changes EvadeToggle.... and when calling an alias causes it to change the game crashes. What does work is:
/alias tt1 "+turbo; bind 'key' et2"
/alias tt2 "+turbo 0; bind 'key' et1"
but this isn't really desireable because the bind is built into the alias so you must change both alias's (or more for more complicated functions) every time you want to change what key it's bound to.
When you /EvadeToggle it will evadeOn and there fore et1 which changes EvadeToggle.... and when calling an alias causes it to change the game crashes. What does work is:
/alias tt1 "+turbo; bind 'key' et2"
/alias tt2 "+turbo 0; bind 'key' et1"
but this isn't really desireable because the bind is built into the alias so you must change both alias's (or more for more complicated functions) every time you want to change what key it's bound to.
lol sorry i cant think straight. im ill :(
<EDIT>
AHH, I KNOW WHAT I DID WRONG!
Its UT!
Ok, explination.
CS engine = does an alias, and you have to release the key for it to repeat itself. Aka, you gotta press button, then press button again to have the toggled effect. UT engine changes it direct. Vendetta appears to do so. So my toggle would work in cs, but not in Vendetta/UT. Hehe, glad i got that sorted
<EDIT>
AHH, I KNOW WHAT I DID WRONG!
Its UT!
Ok, explination.
CS engine = does an alias, and you have to release the key for it to repeat itself. Aka, you gotta press button, then press button again to have the toggled effect. UT engine changes it direct. Vendetta appears to do so. So my toggle would work in cs, but not in Vendetta/UT. Hehe, glad i got that sorted
I don't understand why your toggle doesn't work. I think it should. I haven't done alias's in UT or CS... but it should work and not crash. : (
Ok, UT changes teh config direct, CS waits to change it.
Bah, cant explain.
Basically, UT does a direct change, as does Vendetta. This allows loops, but can be a bitch to script if you are used to CS.
Cs is less powerful, but its what im used to. So i make mistakes that will crash the game.
Bah, cant explain.
Basically, UT does a direct change, as does Vendetta. This allows loops, but can be a bitch to script if you are used to CS.
Cs is less powerful, but its what im used to. So i make mistakes that will crash the game.
in Cs u have 2 diferent .cfg files : config.cfg and autoexec.cfg
the first is for bind keys and the second is for the allias
ex : config.cfg
bind "F3" "HE"
autoexec.cfg
alias "close" "wait; wait; wait; slot 10; wait; slot 10; wait; wait; wait; slot 10"
alias "HE" "buy; menuselect 8; menuselect 4; close"
in game press f2 and the config.cfg will send a request to autoexec.cfg name "he" and will execute command line
vendetta bind/alias system seems to work diferent.... first the request is sent to the same file... etc...
the first is for bind keys and the second is for the allias
ex : config.cfg
bind "F3" "HE"
autoexec.cfg
alias "close" "wait; wait; wait; slot 10; wait; slot 10; wait; wait; wait; slot 10"
alias "HE" "buy; menuselect 8; menuselect 4; close"
in game press f2 and the config.cfg will send a request to autoexec.cfg name "he" and will execute command line
vendetta bind/alias system seems to work diferent.... first the request is sent to the same file... etc...
Well, my Cs directory has about 30 .cfgs files...but thats just me :)
And it doesnt work differently imo Tracid.
CS binds a key to execute a command. When you type alias, you are defining a command with other commands.
A. K. A.
alias M4 "buy; menuselect 4; menuselect 3; wait; wait; menuselect 0"
altho i use the generic w, ms4 etc.
(alias w "wait", alias ms1 "menuselect 1")
I will now attempt to explain in full.
When you press down on the key in vendetta, it runs the alias.
Lets say the alias changes the alias that its running :P
confused?
alias bob "load config.cfg; alias bob 'say die'"
dunno if correct syntax, but would work in cs.
cs would then load the config and set up the alias so that the next time the alias was run, it would run the new alias.
As UT and Vendetta are direct, then it would run the new alias straight away...which is more powerful, but can produce more bugs.
Aka, when you pressed the button it would load the config.cfg AND say die. Thats not a problem you say.
Well look at this one.
alias ET1 "alias evadetoggle 'evadetoggle1'"
alias et2 "alias evadetoggle 'evadetoggle2'"
alias evadetoggle1 "load eva.cfg; et2"
alias evadetoggle2 "load norm.cfg; et1"
alias evadetoggle "evadetoggle1"
bind F8 "evadetoggle"
Cant be arsed to check if this actually works, but i will now explain what it does.
You press F* and it runs the command evadetoggle, which is (at the moment) set to run the command evadetoggle1.
Evadetoggle1 loads the eva.cfg, then changes EvadeToggle so that it runs EvadeToggle2. In cs, this would mean that the NEXT time you pressed F8, it would run evadetoggle2.
Not so with vendetta.
Vendetta runs the alias straighta fter it changed it, because to it you are still running the alias (unless you can move your fingers faster then your PC can think) and so it basically creates a loop. This wouldnt kill the game, (or at least i dont think it would) but it would sure as hell mess it up. You would basically be running one script, then the other, then the first one, then the other. And because in evadetoggle, one will negate the other. so you dont get anywhere.
Fun fun fun.
If im wrong Devs, please correct me, but im pretty sure im right.
And it doesnt work differently imo Tracid.
CS binds a key to execute a command. When you type alias, you are defining a command with other commands.
A. K. A.
alias M4 "buy; menuselect 4; menuselect 3; wait; wait; menuselect 0"
altho i use the generic w, ms4 etc.
(alias w "wait", alias ms1 "menuselect 1")
I will now attempt to explain in full.
When you press down on the key in vendetta, it runs the alias.
Lets say the alias changes the alias that its running :P
confused?
alias bob "load config.cfg; alias bob 'say die'"
dunno if correct syntax, but would work in cs.
cs would then load the config and set up the alias so that the next time the alias was run, it would run the new alias.
As UT and Vendetta are direct, then it would run the new alias straight away...which is more powerful, but can produce more bugs.
Aka, when you pressed the button it would load the config.cfg AND say die. Thats not a problem you say.
Well look at this one.
alias ET1 "alias evadetoggle 'evadetoggle1'"
alias et2 "alias evadetoggle 'evadetoggle2'"
alias evadetoggle1 "load eva.cfg; et2"
alias evadetoggle2 "load norm.cfg; et1"
alias evadetoggle "evadetoggle1"
bind F8 "evadetoggle"
Cant be arsed to check if this actually works, but i will now explain what it does.
You press F* and it runs the command evadetoggle, which is (at the moment) set to run the command evadetoggle1.
Evadetoggle1 loads the eva.cfg, then changes EvadeToggle so that it runs EvadeToggle2. In cs, this would mean that the NEXT time you pressed F8, it would run evadetoggle2.
Not so with vendetta.
Vendetta runs the alias straighta fter it changed it, because to it you are still running the alias (unless you can move your fingers faster then your PC can think) and so it basically creates a loop. This wouldnt kill the game, (or at least i dont think it would) but it would sure as hell mess it up. You would basically be running one script, then the other, then the first one, then the other. And because in evadetoggle, one will negate the other. so you dont get anywhere.
Fun fun fun.
If im wrong Devs, please correct me, but im pretty sure im right.
Hmm, it's not supposed to work that way if it does.
It should run the alias and then if the alias is changed it won't reexecute it right away. I'd have to check and see what the game actually does though. It may be a bug.
It should run the alias and then if the alias is changed it won't reexecute it right away. I'd have to check and see what the game actually does though. It may be a bug.