Announcement

Collapse
No announcement yet.

Can't package my game : ensure ObservedKeyNames.Num() > 0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't package my game : ensure ObservedKeyNames.Num() > 0

    Hello everybody !

    I'm a real newbie in AI programming. In fact, I just made my first attempt ^^
    My BT is working pretty well in editor but when I want to package my game for win 64, I get this error :

     
    Spoiler


    I make a research on this and I found this post on the answer hub : https://answers.unrealengine.com/que...kage-game.html

    Originally posted by mieszko
    This means you have a BP-implemented BT decorator, that uses BB keys, its instance is set to abort lower priority or self or both, but the BB key is not set. Go through your BT decorators and validate the setup.
    I have only one decorator witch abort lower priority (to reset an active moveTo) and then, I know exactly where the problem is and what BB key is needed.
    But I don't know how to correct it...
    I try to set the value of this key between the "use Blackboard" node and the "run behavior tree" one but the problem still the same...
    How can I set a BB keys before the packaging ?
    What "validate the setup" mean ?

    Thank for your help
    Sauvage's twitter - #freeNeoFur

    #2
    Hi,

    I am by no means a BT expert and I maybe wrong. But here is what I usually do with BB keys.

    I will declare BB variable inside decorator BP and check the BB's edit flag to true.

    Then I will assign the value from BT (simply go to my BT and click the decorator's instance and assign the BB value from there.)

    That way, the BB's value will be assigned even before the BT starts running.

    The down side of this method is, I will need to set the same BB key for every decorator instance, but this will work in packaging build.

    Again, I may be wrong, if you found another way to assign BB values, please let me know >.0


    Hope this help.
    Steam Page

    Comment


      #3
      Hi Rit !
      Thank you
      Alas ! My problem remains...

      I did what you propose :
      I add the variable to the decorator BP.
      Set it to editable.
      Give it a default value (false)
      Then, I check if the BB is valid and use the BB value if it is and the default value if not.





      In my BT, when I select my decorator, I can set a value to the variable :



      But I still can't package my game. I've got the same error.
      What did I miss ?

      EDIT :
      I read your answer again and I think that I miss this :
      Originally posted by rit View Post
      I will declare BB variable inside decorator BP and check the BB's edit flag to true.
      When you speak about BB variable, you don't speak about the "resetOrder" bool but a ref to the actual BB ?
      If so, I don't understand this step

      Last edited by JoGoiA; 12-05-2017, 01:58 PM.
      Sauvage's twitter - #freeNeoFur

      Comment


        #4
        Hey @JoGoiA!

        Sorry for the confusion.

        When I said "BB variable" I was referring to a "Black Board Key Type variable".

        I see in your second image, you have a BlackBoardKey Type which is named "resetOrder".

        So in your decorator BP, you should declare a BlackBoardKey Type (not a boolean type like in your first image), and

        check its edit flag to true and assign its value (resetOrder) from BT.

        And call GetBlackBoardValueAsXXX, SetBlackBoardValueAsXXX

        (sorry I can't open UE4 right now, so the function's name could be wrong) to get/set the BB key's value.

        (I can't find anything wrong in your decorator BP, but I don't get BB from controller, since BT already has a reference to its BB
        so calling GetBB from controller seems redundant to me, but I'm not sure whether this is an issue or not.)

        Hope this helps~~
        Last edited by rit; 12-06-2017, 12:01 AM.
        Steam Page

        Comment


          #5


          I will look at what you say about the getBB thing but my package is successful
          Thank you so much, Rit !
          Sauvage's twitter - #freeNeoFur

          Comment


            #6
            Yay! Congratulations~

            ^.^y
            Steam Page

            Comment

            Working...
            X