Reply To: Passing information between Dialogue Tree and Scene

NodeCanvas Forums General Discussion Passing information between Dialogue Tree and Scene Reply To: Passing information between Dialogue Tree and Scene

#12897
Gavalakis
Keymaster

Hello again,

I think it would be better if you try to achieve what you want by using some sort of static events, in which the ActionTask can subscribe to instead of trying to get a reference to the action task object itself.

Here is a very rough example of what I mean:

You could also turn the above example into some kind of a “manager” if you’d like.

Then in your action tasks, you could subscribe to the event in the OnExecute method like this:

This way, and by using events in general, you don’t have to worry about referencing everything. 🙂

Let me know if that works for you.
Thanks.

Join us on Discord: https://discord.gg/97q2Rjh