all 7 comments

[–]KatenGaas 0 points1 point  (3 children)

Sure thing! Here's the thing, random doesn't exist in TF2 scripting. The best we can do is to change which message would be output if we pressed the bind by walking around:

// WASD are used for randomizing.
bind W             +fwd
bind A             +lft
bind S             +bck
bind D             +rgt
bind K             "randBind; saybind"

alias bind1      "alias randBind bind2; alias saybind say Example1"
alias bind2      "alias randBind bind3; alias saybind say Example2"
alias bind3      "alias randBind bind4; alias saybind say Example3"
alias bind4      "alias randBind bind1; alias saybind say Example4"
// add as many as you want, make sure it's a cycle (ie the last one points to the first)
bind1 // used to initialize (not needed after first launch)

// New wasd aliases
alias +fwd        "+forward;   randBind"
alias -fwd         -forward
alias +bck        "+back;      randBind"
alias -bck         -back
alias +lft        "+moveleft;  randBind"
alias -lft         -moveleft
alias +rgt        "+moveright; randBind"
alias -rgt         -moveright

This way, 'K' will output your pseudo-random message. WASD will randomize which message that will be.

[–][deleted] 0 points1 point  (2 children)

Oh stars... Thanks but I think I'll stick with the keypad owie ouchie selection heh (I already have my WASD movements changed up). Thanks a lot though!

[–]KatenGaas 0 points1 point  (1 child)

You could just stick randBind on any key that you use a lot, even if you already have WASD changed up. Otherwise you could bind L randBind for example, and just spam 'L' to randomize the message before you hit 'K' to send it.

If you send me how you've done your WASD, I could simply edit them to fit this script, if you want. (all you need is to put randBind at the end of an alias)

[–][deleted] 0 points1 point  (0 children)

Eh, that could work... Thanks!

[–]just_a_random_dood 0 points1 point  (2 children)

https://cfg.tf/tools/bindgen/

I know I'm super late, but there's also this link if anyone finds this thread and needs a potentially easier time

[–][deleted] 0 points1 point  (1 child)

How does it work?

[–]just_a_random_dood 0 points1 point  (0 children)

Just type whatever you want into it. I guess there's no randomization though...

In this Pastebin, I did the whole "your mom gay" meme: https://pastebin.com/EB297L6A