Execute stops after bool = true, despite both branch executes being in use

Encountered a bug with Blueprint that I just can’t seem to find a solution for.

My AI Service is checking to see if a bool blackboard key is set to true. It has tasks to perform for both True and False results. However, when the bool is true, the execute immediately halts, with no error messages.

This is the blueprint script in question:

And this is the output:

132277-whatthehell.png

Absolutely pulling my hair out over this. I’ve tried removing the branch node and replacing it with a fresh one as well as restarting UE4.

Is this bool used anywhere else to trigger something? I also remember having a weird case with bb that needed me to use an int and set that to 0 or 1, bool didnt work (idk why)

The bool is used in a Task where if it is true, the task will not immediately fail. Said task is also what reverts the bool to false, but I thought that Tasks run after the Service.

HOWEVER, while attempting to try your int suggested, I spotted that I had another print string in the actor where the Check Room bool is set to true, that prints said bool’s value immediately to check it was set correctly. So it turns out that first print string in the screenshot is not actually giving any result at all. Not even the usual blank space to indicate Null, its just not running when the bool = true, as if it’s being skipped in the execute line.

Note: The key IS being set correctly, as the Task is able to use it as normal. It is only the service that can’t.

Edit: Also, the keys are assigned correctly on the behaviour tree as well.

How did you setup the task? I it might have been set up to abort itself when it turns true? Could you screenshot the entire blueprint, there might be something being overlooked.

I’ve went and looked over the task, it does not abort itself when true, only when false. All execute nodes after the check that do not result in cast failures result in the task proceeding as planned. I’ll screenshot every instance of the bool being modified now, and a corrected output log:

132287-boolerror4.png

Between ‘Trap is sprung, check room’ and ‘Task Is Firing’, it should be printing ‘true’ and ‘RoomCheckIsTrue’.

I’m going to try rebuilding the service from scratch in a fresh blueprint, in case the current service got corrupted somehow.

Update: Rebuilding the service didn’t work, same error.

I currently have the service ticking every 0.2 seconds. This has been working for everything else (note, there is another task that does a very similar check to the above with a different Key, that one works just fine)

If you have any ideas for a workaround that would be great, though I realise this is a pretty weird bug.

I’m not sure but I’ll share my thoughts:

The service is not ticking fast enough (it’s by default not the same rate as normal tick) this way when the bool is set true it would not get into service tick, but it will do the task which in its place sets it back to false.

If this is not the case then I don’t know what the issue might be.

Okay, I found something that appears to fix it, after the changes made in the comment chain. Before I set the bool to false in the task, I added a delay equal to the service’s tick rate. That seems to have resolved the issue, though I couldn’t tell you how.