[ZS] New entity: trigger_playergroup



  • Description: An entity that checks for a certain player count within the volume, and if so, triggers a set of outputs.

    Keyvalues: Player count -> Amount of players required to trigger this entity. Can accept -1 for requiring all players of that team to be standing within the volume, regardless of the teams actual size.
                    Team -> Which team should this entity check for
                    Delay -> How long should this entity wait after it reaches its set player count before firing its outputs. Rechecks the playercount within the volume once the delay is finished. If the playercount is lower, then it does not trigger, and the delay is reset and checked once again once it runs out. If it’s the same or higher, it fires its set outputs.
                    Continuous -> A boolean that sets if this trigger can be triggered multiple times or only once.

    Outputs: OnPlayerCountReached -> We have reached our set playercount, fire our outputs

    The other inputs/outputs for the normal trigger_ entities should probably be added along with this.

    Reason why I want this entity: Allows for a mapper to dictate what happens based on if a certain amount of players are standing within a volume. As far as I know there is no trigger entity within the source engine that only fires outputs when a certain number of players stand within the volume, only trigger entities that fire whenever one entity walks within it.

    Examples:
                    1. A dynamic spawn changer for zombies. Should a map with multiple zombie spawns detect a large group of humans standing within the volume (placed near one of the zombie spawns), the map can disable that zombie spawn’s spawnpoints and force zombies to spawn elsewhere, then re-enable them once the playercount lowers down below the set number. Prevents spawncamping by forcing zombies to spawn elsewhere.

    2. Objective maps could use this entity to incorporate objectives that would logically take more than one person to do. An example could be 3-5 humans moving a broken down car to a nearby gas station while the other humans search for supplies and gunning down zombies.



  • Description: An entity that checks for a certain player count within the volume, and if so, triggers a set of outputs.

    Keyvalues: Player count -> Amount of players required to trigger this entity. Can accept -1 for requiring all players of that team to be standing within the volume, regardless of the teams actual size.
                    Team -> Which team should this entity check for
                    Delay -> How long should this entity wait after it reaches its set player count before firing its outputs. Rechecks the playercount within the volume once the delay is finished. If the playercount is lower, then it does not trigger, and the delay is reset and checked once again once it runs out. If it’s the same or higher, it fires its set outputs.
                    Continuous -> A boolean that sets if this trigger can be triggered multiple times or only once.

    Outputs: OnPlayerCountReached -> We have reached our set playercount, fire our outputs

    The other inputs/outputs for the normal trigger_ entities should probably be added along with this.

    Reason why I want this entity: Allows for a mapper to dictate what happens based on if a certain amount of players are standing within a volume. As far as I know there is no trigger entity within the source engine that only fires outputs when a certain number of players stand within the volume, only trigger entities that fire whenever one entity walks within it.

    Examples:
                    1. A dynamic spawn changer for zombies. Should a map with multiple zombie spawns detect a large group of humans standing within the volume (placed near one of the zombie spawns), the map can disable that zombie spawn’s spawnpoints and force zombies to spawn elsewhere, then re-enable them once the playercount lowers down below the set number. Prevents spawncamping by forcing zombies to spawn elsewhere.

    2. Objective maps could use this entity to incorporate objectives that would logically take more than one person to do. An example could be 3-5 humans moving a broken down car to a nearby gas station while the other humans search for supplies and gunning down zombies.



  • Mental Hospital could’ve used it, for forcing one player out of a group to teleport through the scare sequences.



  • You can already do this with a trigger_multiple, a team filter entity, and a math counter entity.

    Set the trigger’s filter to the team filter entity. Check the ZS mapping thread for the team ID to use.
    trigger_multiple StartTouch -> increase math counter by 1
    trigger_multiple EndTouch -> decrease math counter by 1
    math counter has an output for when a threshold is reached.



  • @JetBoom:

    You can already do this with a trigger_multiple, a team filter entity, and a math counter entity.

    Set the trigger’s filter to the team filter entity. Check the ZS mapping thread for the team ID to use.
    trigger_multiple StartTouch -> increase math counter by 1
    trigger_multiple EndTouch -> decrease math counter by 1
    math counter has an output for when a threshold is reached.

    I guess I didn’t really look too far beyond the trigger entities. Thanks for letting me know about this, the thread can be locked now.


Log in to reply
 

1
Online

11.3k
Users

15.5k
Topics

300.1k
Posts

Looks like your connection to NoXiousNet was lost, please wait while we try to reconnect.