Motion Controller Support

This page describes how to set up the Dialogue System with ootii's Motion Controller. (ootii's Motion Controller is required.)

Motion Controller copyright © ootii.

Acknowledgements

The Dialogue System integration for Motion Controller was generously provided by Chris Lasting.

Example Scene

The example scene demonstrates how to interact with an NPC and start a conversation using a Dialogue System Proximity Selector component. Alternatively, you could set up interaction using Motion Controller's interaction functionality.

Setup

To set up your scene:

  1. Import the package Third Party Support ► Motion Controller Support. This will unpack files into the folder Assets ► Pixel Crushers ► Dialogue System ► Third Party Support ► Motion Controller Support.
  2. Add a Dialogue Manager GameObject by adding the prefab in Prefabs.
    • Add a Dialogue System Ootii Bridge component. This component adds several useful Lua Functions.
  3. Inspect the Invector character.
    • Add a Dialogue System Motion Controller Bridge component. This component lets you control how the character behaves during conversations.
    • If you want to use the Dialogue System's interaction system, add a Selector or Proximity Selector.

Lua Functions

The Dialogue System Ootii Bridge component adds these Lua functions, which you can use in conversations and Dialogue System Triggers:

Lua Function Description Example
Motions
ootiiActivateMotion(characterName, motionName, parameter) Activates a motion on a character ootiiActivateMotion("Player", "BasicDamaged", 0)
ootiiStopActiveMotion(characterName) Deactivates the active motion on a character. ootiiStopActiveMotion("Player")
Attributes
ootiiGetAttribute(characterName, attributeID) Gets the value of a numeric (int or float) attribute from an IAttributeSource. ootiiGetAttribute("Player", "Health")
ootiiGetAttributeString(characterName, attributeID) Gets the value of a string attribute from an IAttributeSource. ootiiGetAttribute("Player", "Name")
ootiiGetAttributeBool(characterName, attributeID) Gets the value of a Boolean attribute from an IAttributeSource. ootiiGetAttribute("Player", "IsStunned")
ootiiSetAttribute(characterName, attributeID, value) Sets the value of a numeric (int or float) attribute on an IAttributeSource. ootiiSetAttribute("Player", "Health", 200)
ootiiSetAttributeString(characterName, attributeID, value) Sets the value of a string attribute on an IAttributeSource. ootiiSetAttributeString("Player", "Name", "Darth Vader")
ootiiSetAttributeBool(characterName, attributeID, value) Sets the value of a bool attribute on an IAttributeSource. ootiiSetAttribute("Player", "IsStunned", true)
Inventory
ootiiEquipWeaponSet(characterName, weaponSetIndex) Equips a weapon set on the character. For current set, use -1. ootiiEquipWeaponSet("Player", -1)
ootiiStoreWeaponSet(characterName) Stores the current weapon set on the character. ootiiStoreWeaponSet("Player")

<< Third Party Integration