How can I toggle/cycle through settings?

How can I toggle/cycle through settings? - Paint brush near can on floor at home

I want to be able to cycle through names, scripts or source commands.

By cycling i mean switching to another name, script or command after i press a button. Pressing this button repeatedly will go through all those entries until the end where it will reach the first entry again.

For example if I have 3 nicknames A, B and C and want to cycle through those.

Pressing a button shall execute a command that changes my name to B and after pressing the same button again my name will be changed to C. Pressing again will result in my name changing to A again, completing the cycle.

How would a template for this look like?



Best Answer

Full Code Solution 2 - work fine WITHOUT setinfo

alias useName1 "dota_spectator_mode "1"; bind "c" useName2"
alias useName2 "dota_spectator_mode "3"; bind "c" useName1"
bind "c" useName1



Pictures about "How can I toggle/cycle through settings?"

How can I toggle/cycle through settings? - Back view full body of anonymous female painter in casual wear spraying paint on wall with hunkering down on street
How can I toggle/cycle through settings? - Crop faceless tattooed artist taking paint bottle from heap of multicolored spray cans placed on ground on street of city
How can I toggle/cycle through settings? - Creme Brulee on White Ceramic Plates





DON'T Switch to HOLD! (Toggle VS Hold) | Valorant Guide




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Anete Lusina, Felicity Tai, Felicity Tai, Frans van Heerden