Equippable Sound Effects

In depth learning on Basic Scene Configuration is found in this course in Motive Academy.

Use sound effects to improve the user’s experience of an equippable.

Make Effect Prefabs

Create a set of Prefabs for each sound effect. Making these into Prefabs will allow you to easily re-use these effects.

  1. Add the Play Sound Effect Script to the Prefab

  2. Add as many clips you like. The player will randomly choose a sound from this list when it plays:

Attach Effect Prefabs to the Equippable

  1. Attach these Prefabs as children of the Equippable:

Connect Events to the Effects

Now we want to wire up the Equippable so that various Events can trigger these sounds. Most Motive components have a set of Events that you can attach to.

Picking Up

  1. Connect the Grabbable “On Grab Begin Event”:

Equip/Unequip

  1. Connect to the Equippable “On User Equip” and “On User Unequip” Events. (Note that this is slightly different from “On Equip”--”On User Equip” only fires when the user takes an action to equip as opposed to the item being equipped automatically by a Script.):

Drop

To handle effects when an item hits the ground, you’ll need to add a Collision Event Handler script to the object. This component fires events when the object processes a collision.

  1. Set a threshold so that the sound effect only plays when the collision has a certain force (otherwise you will notice any disturbance causes the event to fire)

  2. Attach to the “Collision Enter” event:

Related Articles

Recipes