Update Quick Start
parent
27e14b12a6
commit
6cb19dbd79
@ -56,3 +56,11 @@ Now jump into game and go interact with your character. The dialogue should work
|
||||
|
||||
![](https://git.crabinteractive.com/crabdev/SimpleDialogueWiki/raw/branch/main/Docs/10.png)
|
||||
|
||||
## Custom Events
|
||||
|
||||
The included events are simple demo events. Events work by spawning a child of *BP_DialogueEvent_Base* and executing the logic in the *OnTrigger* event, then calling the parent function to delete the actor. So to create a custom event, create a child class of *BP_DialogueEvent_Base*, override the event *OnTriggerEvent*, add your event logic, then if you want the event actor to be destroyed make a call to the parent function at the end of your logic. To add a call to the parent function, right click the event and click on 'Add call to parent function' and add it to the end of your logic. This system is just a regular blueprint editor on an actor so your options are very flexible. The SpeakerIDs variable that is passed into this event from the dialogue that called it contain all the participating dialogue speaker components and their corresponding dialogue slots. So if you want to perform an event on a specific person in the dialogue you can iterate over the keys in this variable and find the matching dialogue slot you want. You can then get the owner of that corresponding component and perform your logic on it. An example of what I described is below.
|
||||
|
||||
|
||||
![](https://git.crabinteractive.com/crabdev/SimpleDialogueWiki/raw/branch/main/Docs/11.png)
|
||||
|
||||
In this example we find the correct component for the speaker in dialogue slot 1, which should be the player (or whoever you assigned to that slot) and then we can do something on that actor.
|
||||
|
Loading…
Reference in New Issue
Block a user