How to trigger custom functions?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Trebkiller
Posts: 1
Joined: Fri Sep 18, 2020 9:36 am

How to trigger custom functions?

Post by Trebkiller »

Hi,

I am still struggeling with basics of Dialogue System.
How can I trigger my own C# functions in dialogue? For example when Player speaks to an NPC and the NPC says something offensive - I want the player to shoot the NPC. That means triggering my function that takes in 2 parameters:
void PistolShoot(float dmg, float bulletLifeTime)
The function is in a script attached to the player as a component.
What is the standart/best way of doing this? Do I have controll to trigger it at the end of the conversation node?
Lets say I would like a dialogue to close/open a gate in the future. How do you solwe theese kind of problems?

Thanks in advance :)
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to trigger custom functions?

Post by Tony Li »

Hi,

Here's the tutorial:



If you have any questions about it, just let me know.
Post Reply