Is there a way to make a trigger only work if the flag holder is present?

Discussion in 'Mapping Questions & Discussion' started by SirUnknown, May 26, 2016.

  1. SirUnknown

    SirUnknown L1: Registered

    Messages:
    36
    Positive Ratings:
    15
    I want to have a door that opens to the capture zone, and the door only opens to the intel holder
     
  2. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,112
    Positive Ratings:
    6,065
    https://developer.valvesoftware.com/wiki/Func_flagdetectionzone Here you go! You can use the OnStartTouchFlag and OnEndTouchFlag to open and close the door, and use the OnDropped and OnPickedUp to close the door if the flag is dropped (so you can't just drop it in the detection zone and leave the door open forever).
     
    • Like Like x 2
    • Thanks Thanks x 1
  3. SirUnknown

    SirUnknown L1: Registered

    Messages:
    36
    Positive Ratings:
    15
    Thank you :D
     
  4. henke37

    aa henke37

    Messages:
    1,912
    Positive Ratings:
    446
    I think there is also a filter that checks if mvm bots has a tag. And having a bomb is an automatic tag.
     
  5. Potada

    Potada L1: Registered

    Messages:
    30
    Positive Ratings:
    6
    So, I'm trying to make doors that will stay open normally, but will then close when a flag is detected. That part works, but when I tested two doors, I set each door's Team property to the opposite sides (one Red, the other Blu). My problem is, no matter which team goes near the doors with flags, they still close. Any ideas what I'm doing wrong or what I can do to get around this?
     
  6. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    59
    Have you tried setting the team of the func_flagdetectionzone ?
     
  7. Potada

    Potada L1: Registered

    Messages:
    30
    Positive Ratings:
    6
    Yeah, sorry if I didn't say it well, but I had changed the Team property for func_flagdetectionzone. One was set for Red, the other for Blu. Even though each separate func_flagdetectionzone brush was set for a differing team, the same player (i.e. me) was affected by both doors.
     
Tags: