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

Discussion in 'Tutorials & Resources' started by A Boojum Snark, Nov 19, 2007.

Thread Status:
Not open for further replies.
  1. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    [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]
     
    • Thanks Thanks x 8
    Last edited: Aug 16, 2009
  2. Logo

    Logo L3: Member

    Messages:
    115
    Positive Ratings:
    25
    What'd you end up doing to fix the return over the pit issue Booj?
     
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    I completely junked the whole physobj dealio, and attached an entity to the flag that can give us it's elevation.
     
  4. Intraman

    Intraman L4: Comfortable Member

    Messages:
    191
    Positive Ratings:
    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!
     
  5. pikatore

    pikatore L1: Registered

    Messages:
    2
    Positive Ratings:
    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!!
     
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    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.
     
  7. Hannibal

    Hannibal L1: Registered

    Messages:
    12
    Positive Ratings:
    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.
     
  8. Shmitz

    aa Shmitz Old Hat

    Messages:
    1,129
    Positive Ratings:
    740
    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?
     
  9. Arhurt

    Arhurt L6: Sharp Member

    Messages:
    316
    Positive Ratings:
    140
    You would need to lower the Pit of Death bottom?
     
  10. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    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.
     
  11. Shmitz

    aa Shmitz Old Hat

    Messages:
    1,129
    Positive Ratings:
    740
    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.
     
  12. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    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.
     
  13. Dr. Glaze

    Dr. Glaze L1: Registered

    Messages:
    1
    Positive Ratings:
    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.
     
  14. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    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.
     
    • Thanks Thanks x 1
  15. The_Ulf

    The_Ulf L6: Sharp Member

    Messages:
    399
    Positive Ratings:
    112
    Oh, sweet! I didn't know you could make "Add Output" edit variable values - crazy useful trick! This helped me out a ton.
     
  16. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    Yeah, it can add/change keys, but not all of them will work when you try to change them, it's hit-or-miss depending on how the entity is coded.
     
  17. Pianodan

    Pianodan L3: Member

    Messages:
    108
    Positive Ratings:
    16
    Never mind, I are idiot.
     
    Last edited: Jun 21, 2009
  18. eerieone

    aa eerieone

    Messages:
    1,009
    Positive Ratings:
    569
    took the liberty to edit ABS´s flag-return-system

    for some strange reason, maybe it was my fault, the flag only returned once, but not a second time after it fell into a pit

    here is my alteration
    DOWNLOAD
     
  19. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    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.
     
Thread Status:
Not open for further replies.