Is it possible to "aim" at entities?

  • If you're asking a question make sure to set the thread type to be a question!

JCapps

L1: Registered
Feb 18, 2014
8
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?
 

JCapps

L1: Registered
Feb 18, 2014
8
0
This is not easily done beyond making entity setups that "guess" where players are using triggers they walk through.

Oh yea! That can work. I'll just need a buttload of trigger boxes. ::p:

Thanks. (5,000th thank ftw)
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
oh is it that high already?
huh... well aint that a coinky-doink.
5-4thanks.PNG

I hit 5000 and YM hits 4000 at the same time?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
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)
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
oh is it that high already?
huh... well aint that a coinky-doink.
5-4thanks.PNG

I hit 5000 and YM hits 4000 at the same time?

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.