[TUTORIAL/PREFAB] Flag return from pits of death.

Status
Not open for further replies.

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
[made obsolete by func_respawnflag, see [ame=http://forums.tf2maps.net/showthread.php?t=4674]here[/ame] for an improved FGD if you don't have access to the entity]
 
Last edited:

Logo

L3: Member
Oct 25, 2007
115
26
What'd you end up doing to fix the return over the pit issue Booj?
 

Intraman

L4: Comfortable Member
Nov 4, 2007
191
0
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

L1: Registered
Mar 14, 2008
2
0
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

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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

Banned
Apr 23, 2008
12
0
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

Old Hat
aa
Nov 12, 2007
1,128
746
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?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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

Old Hat
aa
Nov 12, 2007
1,128
746
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

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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

L1: Registered
Jun 11, 2008
1
0
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

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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.
 

The_Ulf

L6: Sharp Member
May 26, 2009
399
115
Oh, sweet! I didn't know you could make "Add Output" edit variable values - crazy useful trick! This helped me out a ton.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
I'm not seeing the cause for the problem you named, nor how what you did fixed it. However it might be related to the new problem I've been informed of, so I need to do some fixing again.
 
Status
Not open for further replies.