Detecting weapon collision to open doors

Discussion in 'Mapping Questions & Discussion' started by wyvern14, Sep 4, 2010.

  1. wyvern14

    wyvern14 L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Hiya, lurker here looking for some advice.

    I am making trapdoors in my TF2 map, and I want them to be shootable from below by other players, thus making them open. I successfully made the trapdoor and it opens correctly, but I'm at a loss to what kind of trigger to put underneath.

    I couldn't use a func_breakable, since I want the door to reset itself after a few seconds and be shootable again. What to do?
     
  2. EArkham

    aa EArkham Necromancer

    Messages:
    1,579
    Positive Ratings:
    2,203
    I think you can use a func_breakable.

    Just give it tons of health, then check OnTakeDamage instead of OnBreak to open the door. Also, OnTakeDamage, give it more health so it constantly regenerates.

    Never tried it, but think that might work.

    Kep
     
  3. wyvern14

    wyvern14 L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Hmm, doesn't seem to work :( I'll redo it from scratch to make sure though.
     
  4. J4CK8

    J4CK8 L11: Posh Member

    Messages:
    820
    Positive Ratings:
    223
    You can use a func_button, set it's flags to don't move and shoot opens and then make sure the health is set to 0.
    Set outputs to
    OnDamaged OR OnOpen (I don't think it matters which); doorname; open
    OnDamaged OR OnOpen; doorname; close; delay of whatever you want.
     
  5. wyvern14

    wyvern14 L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Zomg it works :D TYVM sir, you just saved my life :):):):)
     
  6. Egan

    aa Egan

    Messages:
    1,318
    Positive Ratings:
    1,512
    Or you could do it my way.

    Make it a breakable and do all the stuff you'd normally do.
    But also make a entity called "Point_Template"
    Name it "TrapdoorTemplate"
    In one of the template spots put in the name of your breakable.
    Now make a "Logic_Auto" entity somewhere nearby.
    On outputs tab: OnMapSpawn - TrapdoorTemplate - ForceSpawn

    Now in the outputs tab for your trapdoor: OnBreak - TrapdoorTemplate - Forcespawn

    YAY Your done.
    Make sure to use different templates for different trapdoors, or they'll all spawn at once.

    Note: If you spawn something multiple times, there will be multiples of themselves. (clones basically)