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).


2. **At the AI Controller **make specif events to set each of the values: ​

  1. 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:

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.

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:

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.