Changing Textures for an in-game calculator

I’m trying to create an in-game calculator that you can press with the use “E” button.
I don’t want to be over-crowding my map with a lot of func_brushes and be disabling and enabling them all

A calculator? Woah stop there. What function do you want it to serve? Like actually doing calculations on the spot?

Sorry, I forgot to be more specific.
I was expecting a basic calculator that adds up numbers

You can use a vtf with 10 picture in it. And a .vmt with the correct proxies parameters.

That way you can use a env_texturetoggle, to SetTextureIndex to what you want.
And that would only need 2 brushes (or more if you want to go over 99).

With a math_counter that do the first number, and OutValue trigger a logic_case outputs, and OnHixMax it add 1 to the 2nd counter (which use OutValue to trigger another logic_case outputs) and reset the first counter to 0. So the whole cycle restart for the counter 1.

To sum it up:

  • One counter do the 0-9, OutValue it do InValue on a logic_case. It will trigger the corresponding case. OnHitMax, that counter reset itself to 0, and will Add 1 to the 2nd counter.
  • 2nd counter do the 0-9 so you can reach 10,20,30,etc…
    OutValue it will do InValue on a logic_case. As this counter receive 1 when the first counter HitMax, it will trigger the corresponding output on the 2nd logic_case.
  • the logic cases will have the SetTextureIndex
  • And your button will just add 1 to the first counter.

Example: 00 -> 01 -> 02 ->… -> 09 -> Counter1 reset to 0 and add 1 to Counter2 -> 10 -> 11
… -> 19 -> same as before -> 20

I hope i explained well. That way is a lot better than using +20 func brush