Currently working on an experiment into giving HL2 an auto-targeting system. As it stands, I've got my player locked into a game_ui as soon as the test map loads, freezing him in place. I want to map PressedLeft and PressedRight to cycle up and cycle down, respectively, through available targets.
The theoretical method is this:
I create an enemy (example, npc_zombie). I parent an info_target to my npc, giving them corresponding names (zombie1, target1). Now, as soon as the zombie can SEE the player, I shoot a command to the target (fireuser1, onuser1) to tell the target to add itself to a list of all currently available targets. The player would press either A or D (default mapping) to cycle up or down through the targets, and his Z-axis rotation would be turned accordingly to point him directly at his chosen target.
Where this all breaks down is after I attach the targets. I haven't been able to find any entity that would behave as a list, nor have I been able to find a way to calculate the proper orientation for the player and force them towards it.
I realize that I could probably do all this with some source code modifications, but I wanted to see if it was possible to do based purely on entities. So far...no good. However, if anyone has any insights, I'd love to hear them and further along my experiment. Thanks.
(PS. The info_targets could probably be eliminated, too, but I like the idea of having the player oriented with the dead-center of the zombie, which is where I would spawn my targets.)