Team Specific Destructable Objects

Discussion in 'Mapping Questions & Discussion' started by Cheesecake, Mar 13, 2010.

  1. Cheesecake

    Cheesecake L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    Hi everyone,

    I have a bit of a tricky question but here it goes :

    A friend of mine is trying to get a new game mode to work, its all working fine except for one slight problem.

    The goal of the map is to 'destroy' an object that the defending team is trying to protect. Is there a possible way to have a team specific destructable object ? That is to say Blue can shoot and destroy it but Red cannot damage it when they shoot it ?

    I have been trying to come up with a solution this evening but i cannot come up with anything that works. Im not even sure if this is possible but i would like to put it out there for anyone to have a go.

    Any help would be greatly appreciated, even if its a nope cant do that at least ill know then :)

    Thanks again
     
  2. Firest0rm

    Firest0rm L4: Comfortable Member

    Messages:
    171
    Positive Ratings:
    33
    cant you just do a func_breakable (prop_physics_override if it's a prop) with a team filter? (filter_activator_tfteam)
     
  3. Cynick

    Cynick L4: Comfortable Member

    Messages:
    153
    Positive Ratings:
    144
    According to the Valve wiki, the only thing that is accepted by the DamageFilter on a func_breakable is filter_damage_type, but I'll go test it with filter_activator_tfteam and post back.

    EDIT: Yes, it works. This is what you need to do. For this example, we'll say that you want to make an object that only BLU can break.

    1. Create a filter_activator_tfteam entity and set it to Blue. Name it filter_blu
    2. Create a func_breakable brush entity (or a prop_physics or a prop_dynamic) and set its "DamageFilter" keyvalue to filter_blu

    Compile and run, it should work.
     
    • Thanks Thanks x 1
    Last edited: Mar 13, 2010
  4. Cheesecake

    Cheesecake L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    Thanks for the help, ill try it out see how it goes.

    Post back the results :)
     
  5. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
    I have seen maps in the past attempt this and it never seemed to work perfictly.
     
  6. Cynick

    Cynick L4: Comfortable Member

    Messages:
    153
    Positive Ratings:
    144
    I edited my above post with the instructions, if you want the VMF I tested in, here you go. The red box is only breakable by the blu team. (The breaking is horribly unrealistic, but its only an example)
     
  7. Cheesecake

    Cheesecake L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    Hey thanks again i just tested it in the map and it seems to be working a treat.

    Havnt worked much with filters, but this has spurred me on to explore some other things in hammer now.

    Thanks again for the help, still got lots to learn XD
     
  8. Penguin

    aa Penguin Clinically Diagnosed with Small Mapper's Syndrome

    Messages:
    1,992
    Positive Ratings:
    1,233
    Devfort did it right. Infact, there's not many ways to NOT do it right.