Subgraph exposed parameters can be updated when running ?

NodeCanvas Forums Support Subgraph exposed parameters can be updated when running ?

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15368
    tarteau
    Participant

    Hi guys,

    I’ve recently bought nodecanvas (High-quality assets, congrats!) and started to use it in my current projet. I’m also new to behaviour tree after years doing AIs with custom states machines, so I’m learning the paradigm and my approach is certainly wrong. Sorry for my awful english, feels free to tell me my if I’m not understandable 🙂

    I have a question about SubGraph exposed parameters.

    In my configuration, I have a basic priority selector that select an “Interacting” branch prior to a “FollowPath” branch. I also want to prevent “Interacting” to be used when “FollowPath” has a current path, in order to prevent an agent to be diverted by an interactable when moving along its waypoint.

    To do this, I set the found path to a variable, do some stuffs to handle partial paths and open doors, and set it to null when the destination is reached. So when the priority selector chooses the next node, I can prevent “Interacting” to be used with a NavMeshPath null check. That pattern seems to work when all my nodes was in the same graph.

    When I moved FollowPath nodes to a subtree, I’ve exposed the current NavMeshPath inside FollowPath graph to feed it to the “Interacting” condition, but I figured out the out value is set only at the end of the graph, not during the execution, but in my case, the priority selector will evaluate Interacting before “FollowPath”, so with a condition not updated.

    So my question is : Is there a way to update exposed parameters when the SubTree is running ?

    Maybe my approach is wrong? I suppose I can tweak the considerations in the priority selector, and use NavMeshPath nullity to do a float or a curve with it, but that’s will be cumbersome if I add another condition.

    Anyway, thanks for the great assets, the ergonomy is really pleasant and besides unity serialization issues with prefabs (as always…), all the issues encountered was my mistakes.

    Attachments:
    You must be logged in to view attached files.
    #15375
    Gavalakis
    Keymaster

    Hello,
    Welcome and thank you for your positive feedback 🙂
    Regarding subgraph exposed parameters, indeed; the parameter out value is only set when the subgraph is finished/done/returns (and is only set when the subgraph starts by the way as well). With that said however, I am already planning to make the out parameter value always be updated even while the subtree is running since that feature has been required more than once 🙂
    This will most probably hit on the next version, but if this is a showstopper for you, let me know and I can send you some temporary implementation that will keep the exposed parameter updated while the subtree is running.

    Thanks!

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

    #15377
    tarteau
    Participant

    Oh, that’s great news 🙂 Do you have an idea when the next version comes up ? I have other things to take care of but if it is more than several weeks, it could be a showstopper if I don’t find another pattern that’s matching my needs. If that’s the case, I’ll gladly take your temporary implementation.

    Thanks for the quick follow up !

    #15384
    Gavalakis
    Keymaster

    Hello and sorry for the late reply this time!
    I am currently working on this and I suspect that the next update (which will include this feature) will go live somewhere around this weekend 🙂
    Thanks!

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

    #15395
    tarteau
    Participant

    Hello ! No worries, you bring good news ! I’m looking forward to the next update, thanks 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.