[4.8 preview 4] AI receive ticks are broken

I’m using the behavior tree for my enemy AI and have found that receive ticks are broken in various instances with 4.8 at the moment.
“Event Receive Tick” node doesn’t work when playing in the editor but “Event Receive Tick AI” does.
And both “Event Receive Tick”/“Event Receive Tick AI” nodes are broken in shipped builds (windows 7 32bit).
“Event Receive Execute AI” Seems to work both in the editor and in shipped though.

1 Like

Hi SwiftIllusion,

I have a few questions about this to help with my investigation. Can you send me a screenshot of your setup in a task/decorator/service where the failure happens? If you are getting “Events” in 4.8 then I am guessing this is an upgraded project from 4.7, is that correct? This may be because events were changed into override-able functions, so I’d also like to ask: what the result is if you move your script from the event and into a function? Please let me know if that helps or if you have any additional information.

Cheers!

It is from 4.7, however the events automatically act as overrides from a quick test. Deleting the events/adding them or adding them via the functions>override menu accomplishes the same thing.
Additionally as mentioned the “Event Receive Execute AI” works fine both in the editor and shipped, and “Event Receive Tick AI” also works in the editor, however “Event Receive Execute” doesn’t work anywhere and “Event Receive Execute AI” doesn’t work in shipped builds.
I can’t get a screenshot of when they fail in shipped, and when putting a breakpoint on “Event Receive Tick” in the editor it simply doesn’t trigger so there’s no error to screenshot.
It transitions through all the tasks though because in the behavior tree I have the triggers to change tasks in the base service. Here’s a screenshot of that -

The “Event Receive Tick AI” evidently works in the service even when shipped, just not in the tasks.

Hi. I have a little similar problem, when was making a Behavior Tree Quick Start Guide from 4.8 preview 3. Which is Owner Actor of the Event Receive Tick can not cast to AI Controller look like. 4.7 is fine!

I tried building a demonstration setup in 4.8 with 4 AI types using the receive tick/receive tickAI/receive execute/receive execute AI, to demonstrate what was happening…however, at least so far everything seems to function correctly in editor/standalone/shipped…I have no idea how though as it’s not meaningfully different to how it’s setup in 4.7. Maybe somehow the functionality is broken when moved from 4.7 to 4.8? When I get the next I’ll try to recreate the demo in 4.7 then update the project to 4.8 and see if that breaks it but thought I’d give an earlier update on what is happening in-case you might have some additional insight.

So after a lot more testing I’ve discovered that it’s not anything to do with the ticks/tick ai I had thought it was. The issue there that made me believe it was related, had to do with me having both the ‘receive tick’ and ‘receive tick AI’ in the graph at the same time-and it would ignore one of them based on if it was standalone/shipped. When you only have the receive tick OR the receive tick AI in the graph they work perfectly.

The issue lies in what I found the problem to be…it’s something I have no idea how to describe or how to interpret it as a bug.
The end result of my AI not working is that my character isn’t visibly being told the correct rotation or velocity I want it to have (I send this information from the behavior tree tasks to the AI controller, which then sets the rotation/velocity of the enemy).
So I made a widget component to write the angle being sent to the enemy by appending each of its angles to a string and setting text above its head. This works in the editor perfectly fine…however, the result in shipped makes absolutely no sense.
This is a screenshot - http://i.gyazo.com/ac8f4f906370c44fdfa9c174777cf10e.png
That’s the numbers of each angle it’s apparently telling my enemy to be set to?
EDIT: And here’s a comparison of the enemy velocity in the editor and in shipped.
Editor - http://i.gyazo.com/6400fb0cb03fd3e6abf35de2f63585c8.png
Shipped - http://i.gyazo.com/dbbff3357218083b5201e080d122f306.png
Even though I have it calculate the velocity it should have so that it moves towards the player, regardless of location relative to the enemies the velocity is set to whatever that is.

Hi SwiftIllusion,

Could you post some screenshots showing the tasks that are implementing the rotation/velocity and how those values are being passed through?

Sorry, I’ve been trying to build an example scene to show the issue in an easier form but pinpointing it has been beyond confusing, causing it to take over a day to build a meaningful demonstration., which I’ve now posted here - [4.8preview4] AI/behavior tree bugs in editor/shipped (example scene included) - Blueprint - Unreal Engine Forums - which should help you a great deal more finding a solution hopefully :).
I posted it in a separate topic because I discovered the core problem wasn’t related to the receive ticks and I’ll post that as an answer in a moment to clear this posts bug report.

After more hunting and experimenting I discovered the problem here wasn’t related to receive ticks in the tasks, however it should be noted that even if you’re only actively using “Receive tick” or “Receive tick AI” in a task, if you have both events in the graph it will only choose one of them to use when playing (which resulted in my initial confusion as it chose to use the tick event I had no nodes attached to).
So marking this post as answered.

1 Like