Making Targets

Semnae

L1: Registered
Mar 10, 2008
21
4
I'm trying to make targets that fall over or move out of the way when you shoot them, and then reset themselves after a short amount of time. I figure there are two ways of doing this:

The first is to create a door that opens when you shoot it. First I created a brush, and tied it to "func_door". I changed the speed to 500, and the Health (shoot open) to 1, and the Move Direction (Pitch Yaw Roll) to 90 0 0. When I test it, it the brush goes into the floor quickly like it's supposed to, but only when I get near it. I cannot shoot the door open. When I step away from it, the target resets like it's supposed to.

My second idea was to create a brush, then tie it to "func_physbox" and named it Target. "Damaging it Doesn't Push It" is set to no by default. I then tied the ground to "func_brush" and named it ground. Finally, I connected the two with a couple "phys_hinge" entities. I changed the Name to Hinge, Entity 1 to Target, Entity 2 to Ground, and Friction to 1. When I test it, it doesn't do much. When I push on it, it makes a door opening sound. When I shoot at it, it shakes a little bit. If I mess around with the Hinge Axis in Hammer, I can make the entire object rotate when I shoot it, but I haven't quite figured out how to make it fall over backwards yet. In any case, the object never resets.

I'd appreciate any help. Thanks in advance.
 

l3eeron

L8: Fancy Shmancy Member
Jan 4, 2008
593
88
vmf is a Valve Map File.
Im trying to make tutorials you can compile and play

What if you make one big .vmf, with a small level, in all it various stages neatly seperated, but all in one .vmf. The tutoree would copy/paste what ever section they were studying into a new vmf to compile and play. :huh:


But back on topic...

Im going to try something using func_breakable, Ill report back.
 
Last edited:

Semnae

L1: Registered
Mar 10, 2008
21
4
func_breakable seems to work well. I shoot at it and it shatters. Now how do I get it to respawn?
 

DJive

Cake or Death?
aa
Dec 20, 2007
1,465
741
check this link out.

http://tf2maps.net/showthread.php?t=1167

It is for respawning glass before and after an area is captures, however, the capture can really be anything, IE, before and after something health goes to "0"
 
Last edited:

Semnae

L1: Registered
Mar 10, 2008
21
4
I finally got it to work! Here's how:

1. Create a brush
2. Tie it to func_breakable
3. Name the brush
4. Create a point_template entity.
5. Name the entity.
6. Under "Template 1", put the name of the brush
7. Create a logic_auto entity.
8. Add an output to the logic_auto entity with the following data:
My Output - OnMapSpawn
Target Entity - Name of the point_template entity
Target Input - Force Spawn
9. Select your brush and open its properties
10. Add an output to the brush with the following data:
My Output - OnBreak
Target Entity - Name of the point_template entity
Target Input - ForceSpawn
Delay - The number of second you want the brush to wait before respawning.

Thanks DJive. I don't think I would have ever figured it out without that link. :thumbup:
 

poopster101

L4: Comfortable Member
Jan 28, 2008
155
5
you should make a tutorial out of this
or just copy paste this into a tutorial thread
 

Semnae

L1: Registered
Mar 10, 2008
21
4
Now that I've got them moving, I don't mind making a tutorial. I'll want to put pictures with it though, so give me a little bit.