Killing players with env_beam?

Discussion in 'Mapping Questions & Discussion' started by Lyrit, Sep 21, 2015.

  1. Lyrit

    Lyrit L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    Greetings.
    I have had issues making env_beam kill players on contact. I've tried setting the "Damage / second" property to several high numbers and setting the beam to output to its "!activator" upon being triggered as a "tripwire" (so that it can RemoveHealth or etc. from the player). Neither of these worked for me.
    Due to the beam's endpoint continuously moving in a square, I don't think it's possible to properly overlay a trigger_hurt brush over the beam's path.
    Is there a way to properly make the beam damage people without adding another entity? If not, how could I use other entities to do it?
    Thank you.
     
  2. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    Hi, there.

    The damage by env_beam and env_laser is unreliable. It's always better to use a trigger_hurt with them in my experience, especially if the beam or laser are moving in an odd fashion.

    OnTouchedByEntity > !activator > AddOutput > health 0 or...
    OnTouchedByEntity > !activator > SetHealth > 0

    The second option seems to fling the player further if you use it to deduct a larger amount of health from the player, including going in to negatives like -10000. I believe that might be why players fly so far when being blown up by a robot bomb in MvM, but I'm not sure. SetHealth will not pass the player's maximum health when used with a positive number, but health will overcharge the fuck out of them if you ever needed to.

    If you wanted to use trigger_hurt instead, you could use two func_door_rotating. If I understand you right, your beam emitter is a static point at the top of a square-based pyramid, and its target is following the perimeter of the base clockwise or anti-clockwise.
    • Place two func_door_rotating on top of the env_beam.
    • Parent a trigger_hurt to one of the doors. Make it the length of one edge of the pyramid from top to bottom and line it up along one of them.
    • Parent this func_door_rotating to the other one.
    Then you configure the distance (angle) of each of the func_door_rotating to match the interior angle of the top of the pyramid. Use one door to move the trigger_hurt along X, and the other to move it (and the other door) along Y. Then just send your open and close inputs somehow. Give the doors the spawnflag 'passable' so players won't collide with them.

    You could also parent your beam target entity in this way. I use env_spark for moving targets.
     
    • Thanks Thanks x 1
  3. Lyrit

    Lyrit L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    Though I am disappointed to hear env_beam does not work within itself, your great suggestion has given me the motivation to keep trying at it. I will use your idea. Thank you!