-
Notifications
You must be signed in to change notification settings - Fork 5
Writing Aliases
alias "command" "arg1;arg2 var;argN"
Note: It's not possible to pass more than 2 arguments/variables per semi-colons, the following will not work:
alias stuff "bind x fps_max 20"
The workaround is to create an alias for "fps_max 20":
alias fps20 "fps_max 20"
alias stuff "bind x fps20"
When a key is pressed, +command is called, and when released, -command.
alias +command "arg1;arg2 var;argN"
alias -command "arg3;argN"
Simple key-hold script for switching fps_max:
alias +fps20 "fps_max 20"
alias -fps20 "fps_max 100"
bind z +fps20
Note: All -command aliases are called (alongside with any -keybind) when the menu is open OR a save is loaded.
bxt_append currently allows custom command names whereas special and cmd are tied to _special and name respectively.
alias mainloop "arg1;arg2 var;bxt_append _command"
alias +script "alias _command mainloop;mainloop"
alias -script "alias _command"
alias mainloop "arg1;arg2 var;cmd name"
alias +script "alias name mainloop;mainloop"
alias -script "alias name"
alias mainloop "arg1;arg2 var;special"
alias +script "alias _special mainloop;mainloop"
alias -script "alias _special"
TODO
Take a look at the main page and check how the bunnyhop looping script works in steps, in a way that it freely allows user inputs between +jump/wait/-jump/wait. Jumpbug scripts are basically a long chain of waits that serve as a way for timing -duck;+jump at the right frame.
wait - stops command parsing until the next frame.
alias <command> - defines a new command.
alias - prints all defined aliases.
cl_pitchup - max angle for looking up.
cl_pitchdown - max angle for looking down.
fps_max - limits frame-rate, values are 4-byte float precise.
spk or speak - plays .wav files from the "sounds" folder. It's possible to chain files together using a comma ".".
Further reading https://www.l4dnation.com/wiki/Scripting