Apply an effect the the player carrying the flag

Discussion in 'Mapping Questions & Discussion' started by Mikroscopic, Mar 25, 2016.

  1. Mikroscopic

    aa Mikroscopic

    Messages:
    607
    Positive Ratings:
    617
    How would it be possible to apply a status effect (i.e. marked for death) to a player when they pick up a flag, and remove it when they drop and/or capture the flag?
     
  2. HolySnickerPuffs

    aa HolySnickerPuffs Bad at TF2, Loves Mapping For TF2

    Messages:
    947
    Positive Ratings:
    1,289
    I swear I've seen this question before. Anyway, just parent a trigger_add_tf_player_condition to the flag. Make sure it's only active when touching the flag, and only working for the attacking team.
     
    • Thanks Thanks x 1
    • Agree Agree x 1
  3. Mikroscopic

    aa Mikroscopic

    Messages:
    607
    Positive Ratings:
    617
    I thought I saw it before too, but I couldn't find it by googling it. Would you mind going a little bit more in depth? I'm not very familiar with parenting.
     
  4. Moonrat

    aa Moonrat The end of an era

    Messages:
    898
    Positive Ratings:
    532
    If you want to make it work only for one team, there should be a way to add a team filter to check for the brush.

    As for any other info, just check the VDC https://developer.valvesoftware.com/wiki/Trigger_add_tf_player_condition
     
    • Thanks Thanks x 1
  5. HolySnickerPuffs

    aa HolySnickerPuffs Bad at TF2, Loves Mapping For TF2

    Messages:
    947
    Positive Ratings:
    1,289
    Ok, so lets say you have a trigger_add_tf_player_condition named "X" and a item_teamflag (or whatever they're called) named "Y".

    Put the trigger over the flag, and have it be slightly bigger than the flag.

    Go to the Parent tag in the "Class Info" tab, and type in the name of the flag.

    Bingo bongo bango, you're done.
     
    • Thanks Thanks x 1
    • Agree Agree x 1
  6. Mikroscopic

    aa Mikroscopic

    Messages:
    607
    Positive Ratings:
    617
    Should I use OnPickup to enable the trigger and OnDrop to disable it? Or do I need to use OnPickupTeam1, etc? Since I already put a teamfilter on the trigger.

    Oh, and will this affect everyone who comes close to the flag carrier, or just the carrier?
     
  7. HolySnickerPuffs

    aa HolySnickerPuffs Bad at TF2, Loves Mapping For TF2

    Messages:
    947
    Positive Ratings:
    1,289
    I'm fairly certain you can set which team the effect is applied to, but I can remember how for the life of me. You should be able to find it if you dig hard enough.
     
  8. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    I did this on ctf_cull and i can confirm that it does affect anyone standing very close to the carrier (unless you managed to filter it to the activator).

    Also when i did this, people complained about it (that it was just trying to make the map artificially fun), so it may not be the best idea. But it may well have just been my implementation of it.

    Also Also i reccomend using the 'marked for death silent' effect for it else the flag carrier goes deaf.
     
    • Thanks Thanks x 1
    Last edited: Mar 26, 2016
  9. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    749
    It might be worth to mention since mvm uses this method aswel even though im not sure it will even work.

    You can tag a flag. When turning off smartedit (or maybe ABS' pack already did cover this), add the attribute called tags. Give it a value like bomb_carrier (the mvm default is called bomb_carrier). This tag gets applied to the bomber and is then used to make the bots decide which path it takes.

    Even though they use a filter_tf_bot_has_tag I wouldnt be surprised if valve made it also affect normal players (since those bots are still using regular player slots). If it does then surely this could be a nice workaround. As that tag is then only applied to the carrier itself. So you can use this to apply a hazard, or make the intel behave as a key which only opens a specific door when its actively carried.
    For a neutral flag you can even take this further using a filter_multi both aiming at the tag filter and team filter.

    However, dont rely on this too much, after all its ment for bots. But as an attempt this one could be clean method that ensures only the carrier can be affected. But it can be worth a try.
     
    • Thanks Thanks x 1
  10. Mikroscopic

    aa Mikroscopic

    Messages:
    607
    Positive Ratings:
    617
    Interesting. I'll have to think about which method is best for what I'm trying to do, but I think I should be able to get it to work.