I am attempting to make a func_tank (a mounted rifle) that can be controlled by the player normally: except when they hit the alternative mouse button (or any other acceptable input for that matter) in which case a trigger is activated (could be anything: env_zoom, laser sight, floodlights that blind zombies, stuff like that).
But here's the problem...
I've tried various combinations of many entities, and the basic-most problem is that the game_ui can't find the player when they are using the func_tank...
The initial plan (which doesn't work) was to have the func_tank activate/deactivate the game_ui when it is used/dropped by the player. This would work, except the game_ui cant find the player when they are using the tank.
The next test - to see if it was even possible for this setup to work - was a button beside the tank that activated the game_ui, and the func_tank sitting to opposite it. After the game_ui was activated, the player can turn round and take control of the gun, and the alt-fire button still triggers the output from the game_ui/logic compare combination.
BUT the problem there is that the alternative fire button can be triggered when the player isn't using the gun, and in the case of controlling things like zoom on a scope this is unacceptable.
If its possible to activate the game_ui a split-second before the player takes control of the gun via a single input - then this would give the desired result... but the problem is... how can you do that?
Any ideas :P?
[EDIT]
Just solved the problem: used the "gotplayercontroller" output on the gun to change the compare value on the logic_compare so that it cant activate unless the player is standing in the gun's control volume AND is manning the gun.
So if they let me publish my func_tank tutorial I'll tell you how to make lots of trippy effects including a sniper rifle with controllable zoom
If they don't let me make my tutorial - which might be the case - I'll post it here of course