Is it possible to "aim" at entities?

Discussion in 'Mapping Questions & Discussion' started by JCapps, Jul 14, 2014.

  1. JCapps

    JCapps L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    I have made a func_brush cannon that shoots like this and works fine when rotated. What I want it to do though is "aim" the cannon at a specific point, and that point follow the player as long as it is "in range."

    One of the better ideas that I have tried was making a trigger_multiple that outputs:
    • OnStartTouch > cannon1_tracker (the "aiming" brush) > SetParent > !activator > 0.00
    • OnStartTouch > cannon1_tracker > SetParentAttachment > (I don't know what to put here. I'd prefer something that aims at the feet) > 0.10
    • OnEndTouch > cannon1_tracker > ClearParent > > 0.00

    I figure if I got the parent attachment working, the brush would follow the player. Once that works though, what can I do to aim (rotate) the cannon at the tracker? That's the big issue I'm having. Any ideas?
     
  2. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    This is not easily done beyond making entity setups that "guess" where players are using triggers they walk through.
     
    • Thanks Thanks x 1
  3. JCapps

    JCapps L1: Registered

    Messages:
    8
    Positive Ratings:
    0
    Oh yea! That can work. I'll just need a buttload of trigger boxes. ::p:

    Thanks. (5,000th thank ftw)
     
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    oh is it that high already?
    huh... well aint that a coinky-doink.
    [​IMG]
    I hit 5000 and YM hits 4000 at the same time?
     
  5. DonutVikingChap

    DonutVikingChap L5: Dapper Member

    Messages:
    228
    Positive Ratings:
    142
    I think you can achieve that somehow with the logic_measure_movement entity.
     
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    Nah, LMM just creates a constant relationship between two entities, either in position or rotation. It can't specifically tell entity A where entity B is. (even then, entity A would need some means of using that info in the manner you need)
     
  7. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,920
    It's like some celestial alignment that happenens once every 30 million years...


    ...Leo's have a good chance at making a new friend this month.