Passing information between Dialogue Tree and Scene

NodeCanvas Forums General Discussion Passing information between Dialogue Tree and Scene

This topic contains 4 replies, has 2 voices, and was last updated by  cgraf062491 5 days, 3 hours ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12811

    cgraf062491
    Participant

    Hello All,

    I was wondering how you pass information from the Dialogue Tree to your game scene and vice versa. For example, if at a certain point going through the dialogue, you want to enable Input Fields on the Canvas, then tell the Dialogue Tree to continue after the Input Fields are filled. Thanks very much!

    #12814

    Gavalakis
    Keymaster

    Hello,

    Probably the best way, would be to use the Action Node and [create a custom ‘ActionTask’] within which you can do whatever desired.
    You could for example create a custom ActionTask, which enables the input in question and awaits use submission. Once submission is done, you can then call ‘EndAction’ within that custom ActionTask, so that the Dialogue Tree continues with the next connected child node.

    If you need any help with creating custom action tasks, please let me know!
    Thanks!

    #12815

    cgraf062491
    Participant

    Thanks so much Gavalakis! I will be playing around with the ActionTasks today. I assume that I have to call to a script somewhere for custom ones. I’m not sure how to ‘EndAction’ though. Any help relating to custom ActionTasks you could send my way would be greatly appreciated. Thanks again.

    #12816

    Gavalakis
    Keymaster

    Hey,

    EndAction, is simply a function you need to call from within your custom Action Task, to signal the end of the action 🙂

    Please take a look at the documentation about Creating Custom Tasks on section 4.0 and let me know if you have any questions at all 🙂
    [LINK].

    Thanks!

    #12820

    cgraf062491
    Participant

    Hello again,

    I have been looking through the Action Tasks in the Dialogue Tree Nodes, but I still do not understand how to make a simple custom task. I see many options of already built in tasks, but not how to implement my own script for a specific node. If I want to do something like the Simple Action example in the link you sent, and in my attachment, on a particular node, can you tell me how to implement that specifically? Thanks so much!

    Attachments:
    You must be logged in to view attached files.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.