Accessing blackBoard variables from outside the FSM

Forums 💬 NodeCanvas ⚙️ Support Accessing blackBoard variables from outside the FSM

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17522
    dodgytactics
    Participant

      I’m currently having trouble accessing blackboard variables from my AI gameobject instances and Im not sure what calls to use to access it from, get component, I essentially need to access the black board to switch a bool from false to true. I honestly have no idea how you do this so any help will be appreciated and i’ve attached some pictures below.

      I’ve tried accessing it through the node canvas -> state machines -> FSMOwner -> blackboard -> setvalue || but this doesn’t seem to yield any results as it does not take anything I give it

      [attachment file=”12905″]

      [attachment file=”12906″]

      [attachment file=”12907″]

      #17525
      zsoik
      Participant

        Have you tried bool beginMoving = ??; gameObject.GetComponent<FSMOwner>().blackboard.SetValue("BeginMoving", beginMoving);?

        #17524
        dodgytactics
        Participant

          oh interesting so I guess I dont need to go through the node canvas namespace then maybe? interesting Ill give that a shot and let you know how it goes.

          #17523
          Gavalakis
          Keymaster

            Hey,
            You can if you want, also directly get the Blackboard component attached on the gameobject as well, without the need to go through the FSMOwner, since Blackboard is but a component.
            You can then indeed use SetValue and GetValue to get/set any variable on that blackboard.

            Cheers!

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