Creating a player tracking spotlight?

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
I want to create a fake spotlight that tracks the movement of a player.

I have a prop_physic_multiplayer (models/props_lights/spotlight001a.mdl) with a point_spotlight parented to it to simulate the spotlight and the light it casts, and I have a trigger_multiple with an info_target set to parent the info_target to the !activator, which should be the player. When the player walks though the trigger the info_target gets parented to them.

What I'd like to happen is the for the spotlight to constantly track the info_target regardless of whether the info_target is parented to a player or just sitting in the world.

Now I have had a little mess around with phys_ballsocket and following this guide I have my prop_dynamic attached to a wall, but it hangs loose. I can't seem to get the light to point at the info_target. On the phys_ballsocket I have Entity1 set as the prop, and Entity2 set as the info_target. The prop is not parented to anything, and neither is the info_target (by default)

Can someone explain how I could get this to work? I'm not even sure if an info_target is the best choice of entity to parent to the player, as I need something that is invisible to the player and won't hinder their movement.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
I should add I have this error message in my console when it loads the map after compiling:
Code:
Bogus constraint light_rotate (attaches light_prop to ENTITY NOT FOUND:light_target)
light_rotate is the phys_ballsocket, light_prop is the prop_physics_multiplayer, and light_target is the info_target.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
OK I did actually look at using a light_dynamic but was avoiding using it as the map will be on a server and I thought that light_dynamic's didn't work too well in TF2.

But still, thanks for the .vmf file to see how its done. Now I just need to get it all working in my map!