Announcement

Collapse
No announcement yet.

Setting Blackboard key values, debug and suggestion!

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

    Setting Blackboard key values, debug and suggestion!

    Problem
    When setting up any blackboard key you need to use of the function "make literal name", however this makes it very difficult to debug where any key value is actually set?

    I my case I am setting up an ActionStatus Enum value, but I am not really able to where the value is getting changed - both because it is set in blue prints and via BT tasks.

    Solution?

    To make this a bit more easy I have set up new events for each ENUM value - its a trivial hassle to do, but it will make your debug a bit more easy tree steps to do this:

    1. At the AI Controller set the action status via a byte value, check that it is OK. I added a debug bool, just in case I need to do more - the value is also sent to the pawn (NPC_MH).

    Click image for larger version  Name:	BT_BB_keyvalue1.png Views:	0 Size:	160.5 KB ID:	1709374
    2. At the AI Controller make specif events to set each of the values:

    Click image for larger version

Name:	BT_BB_keyvalue2.png
Views:	35
Size:	104.4 KB
ID:	1712207

    3. BT tasks when invoking these events you can now set your debug at the task level - for the ENUM state that you want the inspect:

    Click image for larger version

Name:	BT_BB_keyvalue3.png
Views:	35
Size:	183.9 KB
ID:	1712208

    Suggestion for UE4

    It would be rather simple to add set key value functions to the the blackboard! That is you could cast to the blackboard, in my case 'cast to BT_BB_NPC' and from this you can expose the valid range of keys - and especially the valid ENUM variations. This list of functions could be generated when you save and compile the blackboard.
    Last edited by AssetDK; 01-23-2020, 09:08 AM.

    #2
    I am still investigating how to do this better and I found the standard way to select the ENUM display name on the function, when i want to set the blackboard value:

    Click image for larger version  Name:	BT_BB_keyvalue4.png Views:	0 Size:	122.8 KB ID:	1712598

    When invoking this event function, using the AIControler as target, there is no chance that we can get the status wrong - this is then encapsulating the set value in a simpler way.

    Still the issue here is that we are not able to debug the BT. That is any blueprint can use 'Set Action Status', and there is literally no way to make a break on a specific ENUM value. So the next challenge is to implement some odd way to debug this....

    Additional comment: When I do it this way there is however no ways to locate the specific spots where in the blueprints Patrol is set.
    Last edited by AssetDK; 01-24-2020, 07:58 AM.

    Comment

    Working...
    X