Problem with ConditionTask ButtonClicked

NodeCanvas Forums Support Problem with ConditionTask ButtonClicked

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10453
    kreischweide
    Participant

    I’ve a simple problem that invalidates my flows currently:

    1) I create a SceneManager FSM that is owned by a GO.
    2) I create a GUI button.
    3) I created an action and a nested fsm and a simple OnFinish transition between them. Nested FSM is saved as simple asset file.
    4) Inside the subfsm, I create a transition between two empty actions, condition to be button clicked and assign the GUI button.
    5) I save. Exit unity. Open Unity, open the sub-fsm. Button clicked is no longer assigned and NULL.

    I also tested if the Button Clicked condition looses its value in the main FSM but there it seems to be okay.

    Cant find anything special with the ConditionTask itself, so it must be something in the framework or?

    Attachments:
    You must be logged in to view attached files.
    #10456
    kreischweide
    Participant

    It seems to be by design… So a nested FSM is by default not related and cannot use scene objects. I have to create a bound version on a GO to save it with a button from the scene, correct?

    Maybe it would be more intuitive if a newly created nested FSM is automatically attached to the same GO with a new FSM Owner script and be bound, if the parent is as well?

    #10460
    kreischweide
    Participant

    I’ve converted all nested FSMs for now… its somewhat unintuitive to have bound FSMs that can only sport unbound nested FSMs. Tried to use it as a scene manager, with every screen having its own nested FSM, but this way I need to keep every subelement like buttons, input fields and so as global blackboard variable. With about 5 screen thats quite messy.

    PS: Would it be possible to have nameable blackboard seperators? Maybe just have the “—–” as indisguisable input field, where you can change it when you click in it?

    #10467
    Gavalakis
    Keymaster

    Hey,

    Indeed. Only the master FSM can currently be bound to the owner and all nested graphs (be it FSM/BT or any other type of graph) can only be .asset graph references. This is indeed by design and there are some solid reasons behind this, but I frequently get this request, thus I will see if it could be implemented, while keeping the design clean and if so I will add this feature.

    Thus, currently the way to work around this, would be to use Blackboard variables (not nesescarily global…Just the blackboard of the owner) and use those variables within the nested FSM tasks.
    Since the blackboard is a component attached on the graph owner gameobject, it CAN have scene refences as normal. All that the nested graphs have to do is read from those variable.
    Please let me know if you want more clarification on this subject.

    Regarding the variables seperator, yeas I can certainly add this in the next udpate 🙂

    Thanks!

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

    #10468
    kreischweide
    Participant

    I’m fairly new to your approach so I’ll reread the documentation a bit 🙂 The main confusing thing about it was that you can still assign scene objects to unbound FSM/BTs without any warning of something going wrong when you exit it. Maybe just inserting a warning there or prevent it alltogether would be better instead of working around the design decision. As long as I can understand it, I can work with it, but it happening without any warning was suprising.

    But nontheless, thanks for your great work!

    #10477
    Gavalakis
    Keymaster

    Hey,

    Thanks a lot as well!
    I will see to adding a warning for this situation like you suggest 🙂

    Cheers!

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

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