Create a big, map wide '
trigger_add_tf_player_condition' brush (
can be one big brush or lots of brushes tied to the same entity) and set it to Condition 41 - "Cannot Switch from Melee", and set the duration to -1.
You then need to have add a named
point_clientcommand entity somewhere in the map. I typically name mine '
ClientCommand', but you can pick your own name Go back to the trigger_add_tf_player_condition brush and select it's 'Outputs' tab. Create a new output with this setup:
Code:
OnStartTouch | ClientCommand | command | slot3 | 0.00
Also make sure the 'Clients' flag is enabled in the 'Flags' tab.
Now whenever someone walks into the brush, it will force them to swap to their melee and prevent them from changing until they leave that zone.
While you may want the zone for most of your map, don't include the spawn rooms. You'll want to design those so players walk into the melee-zone as they leave spawn. Spawning player directly in the melee-zone can occasionally cause them not the trigger the 'OnStartTouch' and so those players may have their normal weapons.