# Do something automatically when an input goes on air (triggers)

With triggers, NWK runs a function by itself when something happens on an input or in the program, with an optional wait.

> NWK Live Production · https://nwkglobal.com/help/triggers/ · Setor 360 Tecnologia e Eventos Ltda (CNPJ 68.185.118/0001-75)

## Step by step

1. Click “⚡ Shortcuts and Triggers” and open the “Triggers” tab.
2. Click “＋ New trigger”.
3. In “When it happens”, pick the event.
4. In “On which input”, pick the input where the event happens.
5. In “Do what (function)”, pick the function and fill in what it asks for.
6. If you want, set the wait in “Wait before (Delay)” and click “Save”.


## An example
When the speaker's camera goes on air, put the lower third with their name on Overlay 1. Event: `OnTransitionIn`. Input: the camera. Function: `OverlayInput1In`. With which input: the lower third.



## Events you can use
EventWhen it happensOnTransitionIn / OnTransitionOutThe input starts going into or out of ProgramOnOverlayIn / OnOverlayOutThe input goes into or out of an overlayOnPreviewIn / OnPreviewOutThe input goes to Preview or leaves itOnCompletionThe video reaches the end (with repeat off)OnPlaybackTime / OnPlaybackRemainingThe video reaches a chosen time, or a chosen time is left before it endsOnPlay / OnPauseThe video starts playing or stopsOnSignalLost / OnSignalBackThe input loses or gets back its signalOnVideoCallConnected / OnVideoCallDisconnectedThe CALL guest connects or leavesOnStreamingStart / OnStreamingStopStreaming starts or endsOnRecordingStart / OnRecordingStopRecording starts or endsOnMultiCorderStart / OnMultiCorderStopISO starts or endsOnMasterSilenceThe Master stays silent for a chosen timeOnIntervalA chosen time goes by, over and overProgram events (streaming, recording, ISO, silence and interval) do not ask for an input. The input list only shows inputs that have the chosen event.



## Order and Delay
Triggers for the same event run in list order. Use ↑ and ↓ to change the order. The Delay is in milliseconds (1000 ms is 1 second), goes up to 30 seconds and counts from the previous trigger. It almost always stays at 0. For longer waits, use the Playlist.



## Turn on, turn off and pause everything
Each trigger has a switch to turn it on or off. The ⏸ Pause all button holds all triggers: nothing fires on its own until you click ▶ Resume triggers. Shortcuts, Stream Deck and buttons still work.

Use Show to see only the triggers of one input.



## No loops
Two triggers that call each other do not end up in a loop: the program holds them. For the `OnTransitionIn` and `OnTransitionOut` events, transition functions are left out for the same reason.


## Questions

### Where are triggers saved?

In the project. When you open another project, its triggers apply.

### The New trigger button is grayed out.

Add an input first. A trigger needs an input to exist.

