View Full Version : [TUTORIAL/PREFAB] Flag return from pits of death.
A Boojum Snark
11-19-2007, 12:59 PM
This VMF contains the entity setup needed for making a flag return when dropped into a pit of death.
The comments box each entity should explain how it works and what extra setup may be required.
If you have any further questions post 'em here.
Credits: Me, Logo for starting the work/technique and causing enough chatter for me to notice, Maj. Woody for needing it.
What'd you end up doing to fix the return over the pit issue Booj?
A Boojum Snark
11-19-2007, 03:13 PM
I completely junked the whole physobj dealio, and attached an entity to the flag that can give us it's elevation.
Intraman
01-01-2008, 11:48 AM
This works great! It took some fiddling to get it to work right (for to check the flags and put delays) but once I got it working, it's prefect!
pikatore
04-16-2008, 06:41 AM
copy and pasting the prefab into my level didnt work!!! it is all there but when i get the intel and go past the target point, nothing happens!!
A Boojum Snark
04-16-2008, 01:19 PM
Give more info on your setup and what you did with the system. Just a straight copy/paste won't do anything, things have to be placed in the right place. Did you read all the comments I left on the entities? What exactly are you trying to do with it... the way "go past the target point" sounds makes me think you're trying to do something it wasn't meant to do.
Hannibal
04-24-2008, 06:39 PM
Thanks Snark, needed the pit death thing. Couldn't get it to work at first, then realised I hadn't made the box deep enough.
Shmitz
05-19-2008, 11:45 AM
I have one area I need the flag auto-returned from, because it acts as a pit of death. I have another area where players can walk on the bottom floor fine, and the flag shouldn't be auto-returned if dropped in this second area. Both of these areas are roughly at the same elevation. How do I get the flag to return from one but not the other?
Arhurt
05-19-2008, 12:09 PM
You would need to lower the Pit of Death bottom?
A Boojum Snark
05-19-2008, 12:17 PM
A few ways it can be done depending on your map. What is 'roughly'? If the death pit is even the tiniest bit lower than the other one you can just put the info_target on the floor and set the logic_compare to check for <4 or such.
If the pit is deep enough and far enough from other areas you could also uncheck the p_p_s' flag for axis measurement and do a spherical check for distance, placing the info_target in the center bottom of the pit and setting the logic_compare to a large enough value to reach from the info_target to the farthest corner of the pit (while not reaching the surface... depends on the pit's shape obviously).
If neither of those will work there are more specific ways I could give if you provide hammerscreens of the map or something so I can see what needs to be worked out.
edit: or yes, you could just lower it, but I was presuming that was not an option for location/aesthetic reasons.
Shmitz
05-19-2008, 12:40 PM
In tc_meridian, there are two rounds during which players can move about on the upper ledges of the ravine. During those rounds, I want the flag to return if a player happens to fall into the ravine. The floor of the ravine is actually low enough that I can make it return from the ravine floor and not the floor of the volcano/robot area. The problem comes from the slightly raised rocks and platforms in the ravine, which are actually slightly above the floor of the volcano/robot area.
Because bottom of the ravine is used for one of the other rounds, changing the geometry to make it lower really isn't an option, and unfortunately it's too long and too close to the volcano to use a spherical check.
One thing that comes to mind is having a separate proximity check along the Y axis, for a different info_target set in the volcano. It would have to both be within a certain distance of the bottom of the ravine AND NOT within a certain distance of the volcano area in order to actually return. I'm just not entirely sure how to set up entities for that.
EDIT: Nevermind, figured it out. I just added a second logic_compare and chained them. It still feels like there should be a more elegant solution, but this works.
A Boojum Snark
05-19-2008, 01:32 PM
I ran around the map a bit and realize the complexity of the issue now, if you have it working that's good, I can't think of any real good way to do it offhand but I'll ponder it and come back if I brew something up.
Dr. Glaze
06-11-2008, 07:10 PM
Is there a way to make this work for a teleport entity?
I have a situation in a map that when a player falls into a chasm he gets teleported to the location in the sky where he gets to fight is opponent instead of dying. Will this work so that the flag gets relocated to the intel room before they teleport? It can't go up with them since the only way off the item in the sky is to get killed.
A Boojum Snark
06-11-2008, 08:44 PM
I don't know if it will work to strip the flag from a player, I've never tried it, but if so you could make it work like that, but it'd require some modification.
Put the info_target marker up on your sky thing. Then rather than have the flag initiate the check itself when dropped, have the trigger_teleport initiate it with a small delay, so that the player reaches the destination, and thus the marker area.
If the player cannot explosion-jump to an altitude equal to the teleport area, you can leave it as an elevation check. Otherwise uncheck the flag for axial measurement on the point_proximity_sensor to turn it into a spherical distance check to cover the teleport destination.
TF2Maps.net is proudly hosted by

vBulletin® v3.7.0 Release Candidate 2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.