Unique Player Naming Logic Final

Also Includes: How to create a Health Kit upon Death

  1. Yakibomb

    Yakibomb L3: Member

    Messages:
    133
    Positive Ratings:
    57
    Unique Player Naming Logic - Also Includes: How to create a Health Kit upon Death

    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 two things:
    • How to name up to 32 players at one time.
    • Bonus: How to drop a health kit upon player death on 1-of-6 chance.
    This is a universal player naming logic--It can be used for anything. The health kit is an example of the power of a player naming logic. 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.
    • To delete the health kit from spawning, click the filters with Grouping on, and delete the output. Then delete the related entities (from the trigger_brush and below).

    Special Thanks:
    A Boojum Snark for Egg War: Mechanical logic and other complexities, for explanation and general interest in teaching.
     
    • Thanks Thanks x 1
    Last edited: Nov 3, 2019
  2. BigfootBeto

    aa BigfootBeto Too obsessed with perfection

    Messages:
    433
    Positive Ratings:
    663
    Is there a particular reason for using a 0.34 delay on the trigger enable/disable cycle?
     
    • Thanks Thanks x 1
  3. Yakibomb

    Yakibomb L3: Member

    Messages:
    133
    Positive Ratings:
    57
    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.
     
    • Thanks Thanks x 1