Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 2
Making Targets [Archive] - TF2Maps.net Forums

PDA

View Full Version : Making Targets


Semnae
03-13-2008, 02:35 PM
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.

trackhed
03-13-2008, 04:37 PM
im going to try out a way of making vmf tutorials, ill try this subject first

Semnae
03-13-2008, 04:44 PM
PH4T3's tutorials on YouTube are excellent (http://www.youtube.com/user/mattdawg420) and have helped me a great deal with the basics. If you're going to make tutorials, I recommend doing it with videos. Even with pictures, it's easy to get hung up on the text tutorials.

trackhed
03-13-2008, 05:18 PM
vmf is a Valve Map File.
Im trying to make tutorials you can compile and play

Semnae
03-13-2008, 05:43 PM
Oooh! That sounds even better! :thumbup:

l3eeron
03-13-2008, 05:58 PM
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.

MangyCarface
03-14-2008, 12:48 AM
I was about to say func_breakable's probably your best bet. Good for setting damage amounts etc.

Semnae
03-14-2008, 04:47 PM
func_breakable seems to work well. I shoot at it and it shatters. Now how do I get it to respawn?

phatal
03-15-2008, 08:22 AM
func_breakable seems to work well. I shoot at it and it shatters. Now how do I get it to respawn?

Try using a env_entity_maker (http://developer.valvesoftware.com/wiki/Env_entity_maker) and tie this to a point_template (http://developer.valvesoftware.com/wiki/Point_template).

DJive
03-15-2008, 09:31 AM
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"

Semnae
03-15-2008, 03:14 PM
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
03-16-2008, 03:04 PM
you should make a tutorial out of this
or just copy paste this into a tutorial thread

Semnae
03-16-2008, 03:37 PM
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.