Resetting control points by destroying a computer terminal

necro

L3: Member
Mar 24, 2008
106
13
OK, I'm working on a remake of cz2. For those of you who played tfc, you probably remember that you could sneak into the enemy's base and destroy their command center, which would reset all the command points they currently controlled.

The first stumbling block I have is setting up a func_breakable. How do I set it up so that only the enemy can do damage to a command center? Obviously I can't allow some numbnut to keep resetting his own team's CPs.
 

necro

L3: Member
Mar 24, 2008
106
13
Awesome. I'll read thru that thread.

Wonder if that dood ever finished his version.
 

necro

L3: Member
Mar 24, 2008
106
13
OK, the team filter has been working great. I want to refine it though to only allow blast damage (from soldier rockets or demo bombs). I tried a filter_damage_type set to blast, but it doesnt seem to do anything. Is that yet another unsupported entity in TF2? Is there some other way to accomplish this?
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
I think all damage in TF2 is categorized as generic damage. One thing that does effect the damage a func_breakable receives is the "Prop data" keyvalue. Some settings of this value will cause the breakable to ignore certain weapons. I'm not sure exactly which so you'll have to experiment.
 

Foreverkul

L4: Comfortable Member
Apr 12, 2008
157
14
What I would do it set the minimum damage, since rockets and bombs do must more damage in one shot than any bullet could. I would suggest 200, but oding some tests would help.

I think all damage in TF2 is categorized as generic damage. One thing that does effect the damage a func_breakable receives is the "Prop data" keyvalue. Some settings of this value will cause the breakable to ignore certain weapons. I'm not sure exactly which so you'll have to experiment.

I'm sure you can assume things like it you put rock, metal, or unbreakable glass bullets will have little/no effect while if you put wood, pottery, or glass, that would have an effect.
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
What I would do it set the minimum damage, since rockets and bombs do must more damage in one shot than any bullet could. I would suggest 200, but oding some tests would help.

That's a pretty good idea, but I looked at a table of weapon damage for primary and secondary weapons and it would be tricky to choose a damage amount that would allow that. For example, a rocket only does 45-60 damage at a long range but a shotgun does 80-90 at point blank and 180 when it crits.
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
I looked in to the different prop data types. Cardboard would be the closest to what you are looking for. It gets 0.5 times the damage from bullets, 1.25 from melee weapons, and 1.5 damage multiplier from explosives. One disadvantage of this method is that it overrides the breakable's health. Cardboard.Small has 10 hp, Cardboard.Medium has 20, and Cardboard.Large has 40. I think it may be possible to specify your own propdata.txt and override these values.

Also: if you made a custom prop model, you could specify the health and damage multipliers.
 
Last edited: