Team Specific Destructable Objects

Cheesecake

L1: Registered
Feb 28, 2010
8
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
 

Firest0rm

L4: Comfortable Member
Sep 27, 2009
171
33
cant you just do a func_breakable (prop_physics_override if it's a prop) with a team filter? (filter_activator_tfteam)
 

Cynick

L4: Comfortable Member
Feb 7, 2010
153
284
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.
 
Last edited:

Cynick

L4: Comfortable Member
Feb 7, 2010
153
284
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)
 

Cheesecake

L1: Registered
Feb 28, 2010
8
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