Can menu UI be used to change cameras in a map?

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.
  • If you're asking a question make sure to set the thread type to be a question!
  • Something not downloading? Download authors read this.


L1: Registered
Mar 29, 2021
I want to create a dynamic map background who's view changes as you click on menu buttons. For example, highlighting/clicking MVM mode changes the camera to a scene of RED mercs fighting bots. Picking between PVP gamemodes like payload or KOTH would swap to scenes of BLU mercs pushing a cart, or Engi setting up a sentry on a control point. Is there anyway UI can send commands that affect the player's server like that?

Let's just say I'll piece together a map with all of these various scenes ready for cameras to look at.


Sep 23, 2011
Menu buttons can indeed run console commands.


Feb 7, 2008
You can use the ent_fire command to send any input to any entity. I would recommend making a logic_relay for every camera that sends all the necessary inputs to change cameras and fire any other inputs necessary for that particular view, and then set each menu button to trigger that relay.

One issue you may run into is that ent_fire requires sv_cheats 1, so if you're running this map as a background map every time you launch the game, you will be unable to unlock any achievements. I haven't actually tested this so it might not be an issue, but I'm guessing it will be.