Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconId1f393
panelIcon:mortar_board:
panelIconText🎓
bgColor#4C9AFF

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

Excerpt

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

...

Table of Contents
minLevel1
maxLevel6
outlinefalse
typelist
printablefalse

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. Do this by adding

  1. Add thePlay Sound Effect

...

  1. Script to the Prefab

...

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

...

  1. :

...

Attach

...

Effect Prefabs to the Equippable

  1. Attach these Prefabs as children of the Equippable

...

  1. :

...

Connect

...

Events to the

...

Effects

Now we want to wire up the Equippable so that various events Events can trigger these sounds. Most Motive components have a set of events 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”

...

  1. 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 Hanlder 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)

...

  1. Attach to the “Collision Enter” event

...

  1. :

...

Related Articles

Recipes