Lasers for the most serious map

Discussion in 'Mapping Questions & Discussion' started by Crash, Aug 5, 2013.

  1. Crash

    aa Crash func_nerd

    Messages:
    3,182
    Positive Ratings:
    4,878
    Ok, so this is for a goofy map, but my problem is driving me nuts.

    I'm trying to have a certain model move around the map, rotating and shooting the laser along a set path, shooting out until it hits a brush and stops. I can do the movement and rotation and all that just fine, that part is easy enough.

    The part I'm looking for is the above bolded section. I want it to cut itself shorter as it hits geometry, so it doesn't go past it. Tracking the end to the surface isn't really an option due to the complex movement I want it to do. I have tried env_laser and env_beam, but both behave the same way, just going from point a to point b, regardless of geometry.

    I feel like this should be something that is really easy to do with a game engine. Anyone have any ideas?
     
  2. Crash

    aa Crash func_nerd

    Messages:
    3,182
    Positive Ratings:
    4,878
    Ok, this is weird. I got it to kind of work by extending an extremely long connection for the env_laser, but for some reason, the laser goes in reverse.

    As in, the origin point (LaserA1) goes in the opposite direction of the target (LaserA2), shooting up inside of the prop. Interestingly, I can see it adjusting it's distance as the prop moves! So.... That's a fun bug.
     
  3. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    I think the laser dosn't point away from the target, it goes to point 0 0 0. This happend to me when the parent of the laser gave me huge problems for a map.

    As far I remember, only env_beam can be parented without problems, but only to a func_track_train, and env_laser should not have parents from the beginning, instead give it a setParent input with a info_relay....

    Unfortunately I noticed that this won't work anymore after the map has reseted and pointed in really random directions.... it was really strange and in the end I used a custom particle effect as laser with a trigger_hurt :/
     
    Last edited: Aug 5, 2013
  4. Crash

    aa Crash func_nerd

    Messages:
    3,182
    Positive Ratings:
    4,878
    I actually already have 3 env_lasers parented on the map, 2 to track trains, and 1 to func_door_rotating.

    I might have to figure something else out, but I'm REALLY hoping to get the effect I'm looking for accomplished.

    Thanks for your insight on it, though.
     
    Last edited: Aug 5, 2013
  5. Crash

    aa Crash func_nerd

    Messages:
    3,182
    Positive Ratings:
    4,878
    Ok, after fighting it all day I figured it out.

    Env_laser has to be targeting a func_brush, NOT a info_target. They didn't work while parented to a prop_dynamic, but now work that I changed their parent to a tracktrain. The target has to be at least as far away as the furthest point you want your laser to go. In my case, this has to be huge, but it's doable.

    Victory!

    edit: It also works parenting it to a momentary_rot_button which is in turn parented to a tracktrain.
     
    • Thanks Thanks x 2
    Last edited: Aug 5, 2013
  6. deadsource

    deadsource L3: Member

    Messages:
    121
    Positive Ratings:
    21
    Men, I think we witnessed something magical today- a person who could solve his own problem.
     
  7. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,112
    Positive Ratings:
    6,065
    And posted the solution too!
     
    • Thanks Thanks x 1
  8. Crash

    aa Crash func_nerd

    Messages:
    3,182
    Positive Ratings:
    4,878
    9 times out of 10 if I finally give up and post my question on here I solve the problem myself minutes later. Yesterday it took hours.

    Sometimes just "talking" out a problem can help solve it. Probably why I verbalize all my entity i/o work and drive those around me nuts.
     
  9. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    It's infinitely better than the useless response "nvm fixed"
     
  10. Crash

    aa Crash func_nerd

    Messages:
    3,182
    Positive Ratings:
    4,878
    Yeah I hate finding those threads years later trying to solve the same problem. I actually did that a few times with this one.
     
  11. deadsource

    deadsource L3: Member

    Messages:
    121
    Positive Ratings:
    21
    Well the "nvm fixed it" usually comes from people who think that they were stupid for not realising what the problem was in the first place. Although they still should post the answer or at least delete the question entirely so that search engines don't index them. Well, that's where the matureness of the internet user kicks in, I suppose.

    //I feel stupid for writing this