OnLooking trigger?

Avatar
beecake
484 Posts
Posted Nov 22, 2011
Is there an entity which have the OnLooking output? So if I am looking at a test element which this entity is set to, then something else will trigger?
Advertisement
Registered users don’t see ads! Register now!
Avatar
Another Bad Pun
516 Posts
Posted Nov 22, 2011
Replied 19 minutes later
Trigger_Look
Avatar
beecake
484 Posts
Posted Nov 23, 2011
Replied 7 hours later

Another Bad Pun wrote:
Trigger_Look

Awesome! I can't believe I didn't find it myself :smile:

Avatar
Moth
225 Posts
Posted Nov 23, 2011
Replied 16 hours later
We used this to make an interesting new fun element. You can tear it apart and see how it works:

Bumbleball - 'living' test element

&

Avatar
beecake
484 Posts
Posted Nov 24, 2011
Replied 7 hours later
Yea i heard about it :wink: I want to use to make some scary moments :smile:
Avatar
beecake
484 Posts
Posted Dec 03, 2011
Replied 9 days later
Bump: Is it possible to a point_camera to have an OnLooking trigger?
Avatar
Brainstatic
219 Posts
Posted Dec 03, 2011
Replied 33 minutes later

beecake wrote:
Bump: Is it possible to a point_camera to have an OnLooking trigger?

Probably. You could try it out. If it doesn't work, try using an info_target in the same location as the camera.

Avatar
beecake
484 Posts
Posted Dec 03, 2011
Replied 5 minutes later

BOB74j wrote:
beecake wrote:

Bump: Is it possible to a point_camera to have an OnLooking trigger?

Probably. You could try it out. If it doesn't work, try using an info_target in the same location as the camera.

No i want the point_camera to be the entity triggering the onlooking trigger
What i've got right now is a Point_camera parented to a turret. You have to move the turret to the monitor so the camera shows what is is recording on the monitor. This will result in a paradox and the turret will explode.
I tried having an look_trigger triggering a filter_target_name with the output: OnTrigger; filter_target_name; TestActivator.

The properties of the filter is:

filter mode: Allow entities that match criteria
filter name: point_camera

and the outputs:

OnPass; turret; SelfDestructImmediately.

This didnt work out

Avatar
ChickenMobile
2,460 Posts
Posted Dec 03, 2011
Replied 7 hours later
Hrmm that's a difficult one. Technically a trigger_look only acts on a player's direction.

You could simulate it by actually forcing the turret to look in the direction of the monitor when it is in that area, create a trigger which is activated by either the camera or the turret and then make the camera 'setTarget' to the monitor.

You would also have to change the look direction of the turret. The only way I can see this happening is through a script. In this example you would create a logic_script and when the turret touches the trigger "OnStartTouch"->"Logic_script"->"RunScriptCode"->"paradox()"

function paradox()
{
ppos <- EntityGroup[0].GetCenter()
mpos <- EntityGroup[1].GetCenter()

dx <- ppos.x - mpos.x
dy <- ppos.y - mpos.y
   
yaw <- atan2(dy, dx ) * 180 / 3.14159265

EntityGroup[1].SetAngles( 0 ,yaw, 0 )
}

EntityGroup[1] being the turret and EntityGroup[0] being the monitor. You can set the entity groups within the logic_script.

Advertisement
Registered users don’t see ads! Register now!
Avatar
beecake
484 Posts
Posted Dec 03, 2011
Replied 33 minutes later
Nice thank you :smile: I guess i should start learning about scripts now... :wink: