Shoot One, Shoot Two, Shoot Three
Summary
This tutorial demonstrates how to create an object that makes a different sound each time it is shot by a player.
In brief: we will encase a cube with a Trigger of type "TT_Shoot". Then we’ll add a RoundRobin that monitors the Trigger and controls three SpecialEvent actors. Each SpecialEvent plays a different sound, "One," "Two," "Three!"
Instructions
- Create a room
- Add a 64x64 cube somewhere on the floor in the room.
Add a Trigger to the map (see Actor Overview), and place it dead-center inside the cube from Step 2. Set the following properties for the Trigger:
Trigger Properties
Name Value Events → Event shot Trigger → TriggerType TT_Shoot Add a SpecialEvent anywhere in the map. Edit the following properties of the SpecialEvent:
1 SpecialEvent 1 Properties
Name Value Events → Tag one Object → InitialState PlayersPlaySoundEffect SpecialEvent → Sound Sound'Announcer.(All).cd1' Add another SpecialEvent anywhere in the map. Edit the following properties of the new SpecialEvent:
2 SpecialEvent 2 Properties
Name Value Events → Tag two Object → InitialState PlayersPlaySoundEffect SpecialEvent → Sound Sound'Announcer.(All).cd2' Add one more SpecialEvent anywhere in the map. Edit the following properties of this final SpecialEvent:
3 SpecialEvent 3 Properties
Name Value Events → Tag three Object → InitialState PlayersPlaySoundEffect SpecialEvent → Sound Sound'Announcer.(All).cd3' Finally, add a RoundRobin anywhere in the map. Edit the following properties of the RoundRobin.
RoundRobin Properties
Name Value Events → Tag shot RoundRobin → bLoop True RoundRobin → OutEvents → [0] one RoundRobin → OutEvents → [1] two RoundRobin → OutEvents → [2] three
Now, launch the map, point your gun at the cube and fire away!
Related Topics
- Trigger Systems: more examples of using triggers to create complex behaviour
- Types of Trigger: brief summary of trigger actors