Welcome to the second episode devoted to designing Arenas in Dying Light Dev Tools. This time, you’ll see how to make an interactive siren, which emits sounds, light, and triggers special effects. In the Assets window, find the Trigger in section ‘object types’ and place it on the map. In the Trigger’s Attributes window, you can find many options under the Type field, but for the sake of our guide we’ll use the default fuse box. Like in the case of containers, the Trigger’s pivot has to be placed on a surface, so the player’s animation will work correctly. Remember that the blue axis of the gizmo needs to show the direction from which the trigger can be used. We should also name the trigger, we’ll need it for quest creation. Now we place a model of an alarm lamp on our box.

It’ll be our light source. Let’s add said light. And change its color. The next step is to connect the light to the lamp with the ‘Attach to Hierarchy’ tool, accessible from the toolbar. Select the light and choose the lamp as the target. We can pump it up a bit and add a special effect that will activate when the alarm is triggered. It can be found in the same place as light and Trigger, that is in ‘object types’ in the ‘Assets’ window. You can available special effects on the FX Type list or by using search filters. What we’re looking right now are electric sparks. We should also change our lamp to a usable model. And the last thing we need to add is the Sound Emitter. Add the Sound Emitter from ‘object types’ and find the siren sound by typing ‘alarm loop’ in field ‘SoundName’. If you check the ‘Test’ box, you can try out the sound in the editor. Let’s check all these elements in the game. Unfortunately, something’s wrong as the alarm is active from the beginning. To make our objects controllable by triggers, we need to disable them first, and then connect them to the trigger.

To disable an object, select it and uncheck box “m_LEnableState” in the Attributes This box is controlled by other logic objects on the map, in this case by our trigger. By default the trigger is switched off, which you can check or change in its attributes, in field “m_State”. To connect the trigger to the objects, check box „m_Targets”, hold the CTRL key, right-click on the object and choose ‘Add to m_Targets’ from the context menu.

Don’t release the CTRL key and repeat this process for all the objects. When everything is set and connected, let’s see how it works in the game. The siren works great, so let’s move to the next episode. Thanks for watching!.

As found on Youtube



SHARE