UI Jumpscares
A UI jumpscare is an image that appears at a set time when triggered. To see how this is achieved in the UI Jumpscare smart asset, take a look at the gameplay logic in the UI Jumpscare Logic folder.
The alerting display of the image is achieved through mainly the Jumpscare UI and the trigger action component. Feel free to explore and customize their properties to suit your needs.
To select an image for your jumpscare, simply go to the icon field of the Jumpscare UI and choose the image you want to use. You can upload an image in PNG, JPG, or JPEG format by going to My Resource and selecting Uploaded files. For more information on this process, refer to Image Importer.
The trigger action component is set to trigger when players enter the trigger box of the model (as determined by the TriggerArea*TriggerboxIsNecessary properties). Once triggered, the actions you have specified will be performed. For more information on the component, see Trigger action.
Among the actions, the ShowUI and PlayAudio actions are set to have a 1 second delay, while the HideUI action is set to have a 3 second delay. This means that when the jumpscare is triggered, the image will appear with an accompanying sound in 1 second, and then disappear after another 2 seconds. This delay creates a brief but startling moment where the jumpscare image and sound are present.