r/Tf2Scripts • u/AGTMaster • Feb 19 '20
Satisfied Counting Style Script?
Is there any way possible to create a script that could count?
Say I hit a bounded key 5 times, I could then hit another key to output : “5” into the chat.
I know part of the “limits of scripting” said that you can’t read or add to values in cVar, but I wondered if there was any sort of loophole.
Probably a dumb question
5
Upvotes
3
u/just_a_random_dood Feb 20 '20
You could probably restyle this (https://old.reddit.com/r/tf2scripts/comments/ax1qp4/_/) to fit your needs
2
u/pdatumoj Feb 20 '20
You could essentially hardcode a scroller script (akin to a message spam rotator) which would do this. The limit on the count would be the number of aliases you generated. You'd probably also want a reset button, I'm guessing.
Anyway, it'd be easy enough to do, but now you have me wondering why you want to.
1
u/Histogenesis Feb 27 '20
You could use an alias chain right? I dont know how far you want to count though, because there is a limit in the amount of aliases you need to make. If you only want to count to 5 you can do something like
alias count_f "alias count count_g; alias say_count 6"
alias count_g "alias count count_h; alias say_count 7"
alias count count_a
bind KP_INS count
I use a similar chain for my movieconfig where i have one key set to record a movie and a chain that continually creates another filename to record to. This way i can record up to 26 movies with only using keybinds without having to go to the console.