OnLooking trigger?
Quote from beecake on November 22, 2011, 6:06 pmIs 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?
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?
Quote from Another Bad Pun on November 22, 2011, 6:25 pm
Quote from Moth on November 23, 2011, 7:15 pmWe used this to make an interesting new fun element. You can tear it apart and see how it works:
We used this to make an interesting new fun element. You can tear it apart and see how it works:

"Such monstrous sucking-constructions aren't built within one afternoon"
Quote from Brainstatic on December 3, 2011, 12:42 pmbeecake 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.
Probably. You could try it out. If it doesn't work, try using an info_target in the same location as the camera.
Quote from beecake on December 3, 2011, 12:48 pmBOB74j 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_cameraand the outputs:
OnPass; turret; SelfDestructImmediately.
This didnt work out
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
Quote from ChickenMobile on December 3, 2011, 8:00 pmHrmm 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()"
- Code: Select all
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.14159265EntityGroup[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.
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()"
- Code: Select all
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.14159265EntityGroup[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.
