Calling a start Behavior

Forums 💬 NodeCanvas 🗨️ General Discussion Calling a start Behavior

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14076
    chocolacode
    Participant

      Hey Gavalakis,

      I am trying to call a Graph Control
      (Start behavior) task from object A
      To object B. My problem is that
      Object B has 2 graphs, FC and FSM.

      How can I call specifically the
      FSM graph?

      Do Graphs have a name or ID we can
      use for that purpose?

      Thanks!

      #14080
      Gavalakis
      Keymaster

        Hey,

        Sorry for late reply.
        If you drag and drop the FSMOwner Component itself, instead of the GameObject in the task reference object field, then the task will use that reference exactly instead of getting the first found on the gameobject, which is the case if you drag and drop a gameobject instead.

        Let me know if that works for you, or need further help with that.
        Thanks!

        #14079
        chocolacode
        Participant

          Hey,

          thanks for the info, that should work in that case, however

          in this case I have a variable in the task reference object field, how should I work this out?

          thanks

          #14078
          Gavalakis
          Keymaster

            Hey,

            In this case it will only work if the variable is of the exact type required by the Task (in this case GraphOwner) instead of a GameObject type variable, so that it becomes possible for you to drag and drop the Component reference as it would be when not using a variable.

            So the first step to be able to create variables of type “GraphOwner”, would be to open up the Preferred Types editor, search for type GraphOwner at the top and then add it to the list.
            Having done the above, you will be able to create variables of type GraphOwner in the Blackboard and now you will also be able to directly drag and drop the FSMOwner Component into that variable and use that variable in the Action Task object reference field instead of a gameobject variable.

            Please let me know if you need more help with that or more clarification.
            Thanks!

            #14077
            chocolacode
            Participant

              Hey,

              Thanks for the explanation!! that should work 🙂

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