State of the func_flagdetectionzone

Discussion in 'Tutorials & Resources' started by DrLambda, Sep 17, 2016.

  1. DrLambda

    aa DrLambda L69: Teeheehee, Member

    Messages:
    458
    Positive Ratings:
    453
    Hi everyone,

    i just wrote a mail to Valve about this.

    TL;DR: func_flagdetectionzone team property doesn't work and will always trigger for both teams. I hope they fix it in a future update, but for now we'll stuck with that.

    I want to describe the workaround i'm currently using on my Epicenter remake. Before using it, please note that it will trigger in the corner case that a flag carrier of one team is in the same volume as a player from another team. This doesn't matter a lot for what i do on my map, but it could cause some volatile behaviour if you're per example trying to open doors for the flag carrier. It also could be used for grieving.

    For this tutorial, I expect that you know how I/O works.

    1. Create the func_flagdetectionzone where you want it.
    2. Create a trigger_multiple with the same volume. Give it a descriptive name. Set Start Disabled to YES. Set the filter to the team you want to. Set Delay Before Reset to 0.
    multiple.JPG
    3. Put every logic you want into the OnStartTouchAll and OnEndTouchAll of the trigger_multiple.
    multiple_output.JPG
    4. Now: The trick. Enable and Disable the trigger_multiple depending on if a flag carrier is present inside the flagdetectionzone output.
    detection_output.JPG

    Now, the flagdetectionzone will trigger whenever a flag carrier is present (but not when there is a flag, but noone is carrying it,) no matter the team (because that is the buggy part of it,) but the logic will only trigger if there is a player of the correct team inside the volume.

    Like i said, it has cornercases where it breaks down, but right now it seems to be the best method to accomplish what we're trying to do.

    PS: Yes, i tried to use a filter_activator_name set to the flag name, but i can't get it to work. Maybe one of our local logic gurus can help with that.
     
    • Thanks Thanks x 2
    Last edited: Sep 17, 2016
  2. Lemming of the B.D.A.

    Lemming of the B.D.A. L1: Registered

    Messages:
    1
    Positive Ratings:
    0
    I am doing a King Of the flag map, with two neutral flags. I was able to finally get the mode to work using your workaround by simply having triggers for each team (capture, multiple and flag detector), the only issue i am having now is that if both team are in the capture area and one drops the flag and then leaves the area (if he doesnt he still blocks capture) then the other team must exit and reenter the area in order to be able to capture, looking for a workaround right now