Resource icon

Unique Player Naming Logic Utter Final

Yaki

aa
Sep 3, 2018
418
256
EDIT: This logic is mostly obsolete due an improved logic that can name players anywhere in the map. The old logic uses a giant, supermassive map trigger covering the whole map, while the improved one doesn't.

Unique Player Naming Logic - Name all players in the map a unique targetname

We know how messy or simply impossible it is to keep track of player's names in Hammer. For those who want to separate players from each other, this prefab will give them unique names to be called upon by Hammer.

This prefab shows you how to do one thing:
  • How to name up to 32 players at one time.
This is a universal player naming logic--It can be used for anything. More details in the prefab itself.

Replace / reuse / cut 'n' paste this prefab into your maps if you so wish, I don't mind! This has been possible ever since HL2, so it's not exactly new... but it's still not easy. Which is why it needs to be shown in prefab form.

How to Use the Prefab:
  • Click on the Kitteh for the introduction, then work your way down by clicking the Green info_targets for Step1, Step2, etc. For added continuation of each step, click the Red info_null.

Special Thanks:
A Boojum Snark for Egg War: Mechanical logic and other complexities, for explanation and general interest in teaching.
 
Last edited:

BigfootBeto

Party Time 2.0!
aa
Jun 8, 2016
496
847
Is there a particular reason for using a 0.34 delay on the trigger enable/disable cycle?
 

Yaki

aa
Sep 3, 2018
418
256
There's a delay because I suspected there wasn't enough time to let the logic_branches go through branch-by-branch to name each player. There was a bug I had where the logic started to execute two logic_branches at the same time for two separate players, making two or more players get the same name. The delay lets the logic_branch have 0.01s to jump from each branch to the next.

I also want to say... if the delay was lower than about one-third of a second it would start to lag the server? I'm guessing that.
 

Yaki

aa
Sep 3, 2018
418
256