Adding Other Components to the Blackboard

NodeCanvas Forums Support Adding Other Components to the Blackboard

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9718

    I am having an issue with custom tasks where I want to select a custom component from the blackboard of type CharacterBase and NetworkCharacter. I can add them to the blackboard during runtime, but I need to add it manually so that I can use the appropriate blackboard variable from the dropdown list for these custom tasks. The problem I am running into is that in my tasks I have the required fields BBParamater<NetworkCharacter> or BBParameter<CharacterBase> and these do not recognize the blackboard variables that I have added as a generic <Component>, so the only available options are “NONE” and “dynamicVar”. Hopefully you can point me in the right direction on how to add these specific components to the blackboard. Thanks in advance!

    #9721
    Gavalakis
    Keymaster

    Hello!

    There is a very important editor window which allows you to specify custom types to be used along with NodeCanvas in all menus that are type related. This is the “Window/NodeCanvas/Prefered Types Editor”. You can also read more here.
    From that editor you can add your custom types and from there on you will be able to select that type in the drop down of the blackboard variables button.

    Furthermore you have the ability to create a variable of the type that you have specified in the BBParameter, by clicking the small “+” button that shows on the left of the “Please select a ‘CharacterBase’ Blackboard Variable”. 🙂

    Let me know if this works for you.
    Cheers!

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

    #9720

    Got ya thanks for getting back to me!

    I actually found my own workaround where I just let it be selected as a standard BBParameter<Component> and then write it to a private variable at the start of the condition like this:

    so the “as NetworkCharacter” worked well for conditions, and for actions I just went straight in without having to add anything from the blackboard to the task like this:

    These seem to be working alright for me for now. Can you see any disadvantages to doing it this way? Should I switch to the method you suggested or is this way an alright way to go?

    #9719
    Gavalakis
    Keymaster

    Hello,

    Well, its always better to work with the type you need instead generaly speaking. Not NC wise.
    But it works for you thats great.
    I personaly would never do it though unless I can’t do otherwise 🙂

    Cheers!

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

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