How to get information about current node, node before transition…

Forums 💬 NodeCanvas 🗨️ General Discussion How to get information about current node, node before transition…

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13153
    zerox
    Participant

      Hi NodeCanvas developer,

      How can I get information about current running node/state and previous node after transition?

      Specifically getting that information in an ActionTask or a ConditionTask. Is this possible?

       

      Another thing is, how can I check the current node has finished success or not in ConditionTask

      #13156
      Gavalakis
      Keymaster

        Hello there,

        1) Information about the current and previous state nodes can be accessed through the FSM.currentState and FSM.previousState properties. From within a Task (action or condition), you can do this likeso:

        2) There is already a Condition included called “Check State Status” which does that. Is that what you meant?

        Let me know.
        Thanks!

        #13155
        zerox
        Participant

          Thank you for responding,

          However I have tried and it seems you are a bit confused here.

          1, I checked the type of ownerSystem, it has type FSM and not FSMOwer. So owerSystem cannot be cast to FSMOwner

           

          2, I searched and did not find the condition as you said.

          #13154
          Gavalakis
          Keymaster

            Hello again and sorry for the late reply.

            1) My bad. I was meant to write (ownerSystem as FSM). This will return the FSM the Task lives wihin.

            2) Indeed. The “Check State Status” was not part of the version currently on the asset store by omission. It will be on the next version. However I have also attached for you here the condition for your convenience.

            Let me know. Thanks!

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