I'm sorry I'm not good at English.

Is it possible to create a custom node that calls conversation assets like "naninovel" or "fungus" like using a "show dialog" node?

Or do I need to create a c # script?
  • Yes, that's possible - though a custom node is a C# script :)

    Depending on how these assets start their conversations, you might be able to use one of the function nodes to start them. E.g. if they're started by calling a function on a component, you can use the Call Function node for this.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Is there a tutorial for custom nodes or function nodes?
    I'm sorry, but I couldn't understand at all from the letters alone.
  • I would recommend you the one I use: https://assetstore.unity.com/packages/tools/ai/dialogue-system-for-unity-11672
    It comes with ORK integration and it's on sale now

  • There's no specific tutorial for them. For the function nodes (e.g. using Call Function) it mainly depends on the class and function you want to call, so I'd need to know more about what you're using to give you details here.
    It mainly needs the name of the class and the name of the function to work.

    For custom nodes, it's best to copy the code of one of the existing nodes in ORK's source code and change it to your needs.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • If you can call the DialogueTrigger class, the dialog should start, using the call function doesn't work.

    Call Function
    Class Orizgin component
    Class Name DialogueTrigger

    Target Object
    Object Actor
    Actor 0 Player


    using UnityEngine;
    using Naninovel;
    using UniRx.Async;

    public class DialogueTrigger : MonoBehaviour
    {
    public string ScriptName;
    public string Label;

    private void OnTriggerEnter (Collider other)
    {
    var controller = other.gameObject.GetComponent();
    controller.IsInputBlocked = true;

    var inputManager = Engine.GetService();
    inputManager.ProcessInput = true;

    var scriptPlayer = Engine.GetService();
    scriptPlayer.PreloadAndPlayAsync("Test");
    }
    }
  • Well, this is a private function and is usually used when something enters a trigger, so that'll not work.

    I took a quick look at Naninovel's documentation and I think the easiest way to do it would be using the Play Script component (like it's used with Unity events). In this case, the setup for the Call Function node would be like this:
    - class origin: Component
    - class name: PlayScript
    - function name: Play
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I set it as below.
    I'm sorry, but was unable to do so. The operating player just passed through the NPC to have a conversation.



    hierarchy
    NPC to have a conversation
    -Play Script
    -Script Name Test

    -Event Interaction
    -Start Type Interact



    EventSetting→CallFunction
    class origin: Component
    class name: PlayScript
    function name: Play
  • Is the Naninovel script being executed?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I'm sorry, I don't understand. No script error has occurred.
    -Event Interaction
    -Start Type Interact
    Although it is set as above, the operating character will slip through the NPC.

    Naninovel script "Test”
     ”HELLO WORLD”
  • Using the Interact start type requires using an Interaction Controller component or clicking on it to start the game event. If you want to start it when entering a trigger/area, use the Trigger Start start type.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I used the Interaction Controller component for the operating character and NPC, but nothing changed.
  • Can you send me a small Unity test project with your setup to contact@orkframework.com?
    I think it will be easier if I can check and test this myself.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you very much.
    By tomorrow I will send the package to contact@orkframework.com.
  • I sent it by Gmail at contact@orkframework.com.
  • Thanks - as already explained via email, it's not working due to some issues with your player and event setup. For others that might run into this:

    - having an event interaction on the player will usually block other events from being used, since it's always first within the interaction controller
    - in a 2D/3D mix setup without the player's game object rotating, the interaction controller best encapsules the player, as it'll otherwise not catch events it's not facing
    - event interactions need a collider attached to be recognized by an interaction controller
    - make sure to set up and use the correct actor, e.g. if a custom script you want to call via Call Function is on the event interaction's game object, you need to use an Object type actor with Event Object enabled
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.