-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
279f0e2
commit 9fe9bca
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
documentation/docs/docs/03-creating-stories/04-entity-adapter/02-interacting.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
difficulty: Easy | ||
--- | ||
|
||
import EntrySearch from "@site/src/components/EntrySearch"; | ||
import Image from "@site/src/components/Image"; | ||
|
||
# Interacting with an entity | ||
:::info[Before starting] | ||
It's best to first read [Entities & NPC's](./index.mdx) before starting this tutorial. | ||
::: | ||
|
||
In this tutorial, you will learn how to interact with an entity. | ||
|
||
## Adding the entity interact event | ||
First, we need to add the `Add On Entity Interact Event` entry to our sequence. This can be done by clicking on the + icon in the top right corner of the panel and searching for `Add On Entity Interact Event`. Add it to your page by clicking on the + icon. | ||
|
||
<EntrySearch entryName="entity_interact_event"/> | ||
|
||
### Selecting the definition | ||
Now inside the inspector of the `New Entity Interact Event` at the definition field, select the definition of the entity you want to interact with. (For this tutorial that will be Oliver) | ||
|
||
<Image img={require("../../assets/entity-adapter/entity-interact-event-fields.png")} alt="Entity Interact Event Fields" width={400} /> | ||
|
||
## Adding the event. | ||
Now we need to add an event that gets triggered when the player interacts with the entity (For this tutorial we will use a spoken). Right-click on the `New Entity Interact Event` entry and click on `+ link with ...` to open the search menu. Search for `Add Spoken` and add it to the page. | ||
|
||
<EntrySearch entryName="spoken"/> | ||
|
||
Set the speaker to the oliver definition and text field to `Hello I am Oliver.`. | ||
|
||
## Result | ||
You can now publish your pages, and in-game, it should look like this when interacting with Oliver: | ||
|
||
:::warning[Mc-Auth servers] | ||
So while writing this page the auth servers of minecraft are down and i couldn't access my tw server. So i can't provide a video of the result as of right now.(This will hopefully be fixed soon) | ||
::: |
Binary file added
BIN
+26.8 KB
documentation/docs/docs/assets/entity-adapter/entity-interact-event-fields.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.