Example scene showing basic dialog interactions with NPCs.
demo of npc-dialog-example-scene running in preview.
This scene shows you:
- How to animate a 3D model
- How to use the NPC Utils library to create a Non-Player Character
- How to display a whole text tree from a JSON file into a UI
- How to use E and F buttons to pick options in a text tree
- How to keep an NPC facing the player as the player moves
Tip: Find full documentation for the NPC Utils library here
Install the CLI
Download and install the Decentraland CLI by running the following command:
npm i -g decentraland
Previewing the scene
Download this example and navigate to its directory, then run:
$: dcl start
Any dependencies are installed and then the CLI opens the scene in a new browser tab.
Scene Usage
Click on the NPC to start a conversation, use E and F keys to choose options when prompted.
Learn more about how to build your own scenes in our documentation site.
If something doesn’t work, please file an issue.
- Thank you to Polygonal Mind for providing sample code of the NPC used in Tomb Chaser
- alice.mp3 modified from (https://freesound.org/people/mik300z/sounds/103525/)
- bob.mp3 modified from (https://freesound.org/people/mik300z/sounds/103525/)
- charlie.mp3_ modified from (https://freesound.org/people/Satoration/sounds/57296/)
This scene is protected with a standard Apache 2 licence. See the terms and conditions in the LICENSE file.