Condition Question

NodeCanvas Forums General Discussion Condition Question

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #8700
    atmuc
    Participant

    I have a custom condition that listens drag event of InputTouches asset. i subscribe this condition to InputTouches event. i want this condition to listen only it is candidate to run like it is connected to the active state. OnInit runs when it will be used for the first time. is there any other method that runs once and just before OnCheck?

    #8712
    atmuc
    Participant

    with this code i can subscribe and unsubscribe. if there are 2 conditions on a state. i miss one subscription. i need a function like ActivatingCondition, DeActivatingCondition.

    #8711
    Gavalakis
    Keymaster

    Hey,

    Yeah. Such a method is missing. It’s a nice request. I will add in the next version.
    I can walk you through into quickly and temporary adding this now if you want, but chances are that the implementation will change.

    Let me know if you want.
    Cheers

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

    #8710
    atmuc
    Participant

    it would be nice to add such feature. it will useful for resource consuming processes.

    i could not understand about what you ask about what i want? sorry for my English 🙂

    #8709
    Gavalakis
    Keymaster

    Hey,

    Sure I will add this. It would be very usefull in the case of conditions.
    I simply asked you if you want to tell you how to change the source code to make this, instead of waiting for the update to come in the asset store 🙂

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

    #8708
    atmuc
    Participant

    yes i would like to know it now 🙂

    #8707
    Gavalakis
    Keymaster

    Sure. So here what you need to do in the source code:

    1) Open up ConditionTask.cs and add this code:

    2) Open up FSMState.cs and add this code in line #104 just before the OnEnter(); call:

    3) Also in FSMState.cs add this code in line #158 just before the OnExit(); call:

    So now you can override OnEnable and OnDisable in your condition tasks to handle what you are after 🙂

    Cheers!

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

    #8706
    atmuc
    Participant

    thanks 🙂 will you also add this to the next release?

    #8705
    Gavalakis
    Keymaster

    Hey,

    Sorry for late reply.
    Yes this will exist in the next release 🙂

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

    #8704
    atmuc
    Participant

    At OnEnable Method i cannot get Blackboard values. when i debug at OnEnable i can see there are variables at GlobalBlackboard. but result belove is null. it cannot evaluate $Global/MyReference at OnEnable.

    #8703
    Gavalakis
    Keymaster

    Hey,

    Really sorry for the late reply. I missed it somehow.
    I just tried this out and it really works as expected. The variable value resolves correctly from the GlobalBlackboard. What is your setup?
    Could you please send me a reproduction project to check this out?

    Thanks

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

    #8702
    atmuc
    Participant

    i will check it with bounded FSM. have you tried it with FSM as Asset?

    #8701
    Gavalakis
    Keymaster

    Hey,

    Please check your other post where I think it answers for this post as well 🙂

    Let me know.
    Cheers!

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

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