# BTService: Event Receive Tick signature differs compile error

**URL:** <https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075>\
**Category:** AI\
**Tags:** Behavior-Tree, unreal-engine, compile-error, question, Blueprint\
**Created:** [May 19, 2015, 3:26am UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075 "2015-05-19T03:26:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amigo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amigo](https://forums.unrealengine.com/u/amigo)\
**Post date:** [May 19, 2015, 3:26am UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/1 "2015-05-19T03:26:17Z")

</div>

I’m on epic/master and my test project worked last week. I synced to epic/master tonight and now I’m getting this error when trying to compile my BTService blueprint:

**Error Cannot override ‘BTService\_BlueprintBase::ReceiveTick’ at Event Receive Tick which was declared in a parent with a different signature**

 ![43241-bts.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/7/637bb0cb5eb64e00abf16ac02923ceda8fdd873e.jpeg)

The last change to the parent class BTService\_Blueprint\_Base was back in March and my project was working fine until today…

I also tried re-creating my BTService without much effect - still errors compiling the blueprint.

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [May 19, 2015, 8:41am UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/2 "2015-05-19T08:41:23Z")

</div>

The change done in March boils down to unvirtualizing couple of `BlueprintImplementableEvent`-s in blueprintable BT node classes. Those functions should have never been done virtual and be overridden in C++ in the first place.

Obviously, since `ReceiveTick` is no longer virtual you can’t override it. But why do you even derive from `BTService_BlueprintBase`? This class is meant to be derived by BP classes? And if you really, really need to derive from that class simply override `BTService_BlueprintBase::TickNode` instead of `ReceiveTick`.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![amigo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amigo](https://forums.unrealengine.com/u/amigo)\
**Post date:** [May 19, 2015, 11:19am UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/3 "2015-05-19T11:19:23Z")

</div>

Hi Mieszko,

Thanks for your reply.

Am I not using BTService properly then?

You can see in my attachment above what is being done, and it’s just some old AI example - before AI Perception was implemented.

How should I do this, if at all?

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [May 19, 2015, 12:39pm UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/4 "2015-05-19T12:39:10Z")

</div>

Oh, that’s all in blueprints? Sorry, my bad!

So it seems the reason BT node thinks you want o observe BT keys is because you have key selectors in your blueprint, but if fails to find them at some point. It looks like a bug and I’ve filed it as UE-15812.

In the mean time - it’s not a good idea to have a decorator checking if your AI is alive. It’s better to stop the BT when AI dies (`StopLogic` or `StopTree` on AIController’s BrainComponent). Also, the setup you have would result in BT trying to find a task for dead AI every frame, since it will never be able to find a valid task. As a rule of thumb it’s always good to add some fallback behavior (like a Wait task) that would have your from that.

---

<div class="post-metadata">

**Author:** ![amigo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amigo](https://forums.unrealengine.com/u/amigo)\
**Post date:** [May 19, 2015, 4:55pm UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/5 "2015-05-19T16:55:13Z")

</div>

Sorry, but I still don’t understand how I should be using the BTService then and what class to use for it?

Here’s a screenshot of my BT.

 ![43308-bt.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/0/e80291e19159629bf920557838d601f7b7abaf1f.jpeg)

I use the service to determine the distance to a Guard Target and then decide what to do about it. As I said, it’s an old example without using EQS…

Also, why is AIPerception giving me this warning on OnPerceptionUpdated event:

**Info No value will be returned by reference. Parameter ‘UpdatedActors’. Node: OnPerceptionUpdated (AIPerception)**

Thanks!!

---

<div class="post-metadata">

**Author:** ![amigo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amigo](https://forums.unrealengine.com/u/amigo)\
**Post date:** [May 19, 2015, 6:50pm UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/6 "2015-05-19T18:50:05Z")

</div>

@Mieszko

FYI, it also seems that Event Receive Activation, Deactivation and Search Start are not firing at all. I made a test service with a print to screen node and there is no output happening at all. ☹

---

<div class="post-metadata">

**Author:** ![amigo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amigo](https://forums.unrealengine.com/u/amigo)\
**Post date:** [May 19, 2015, 7:30pm UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/7 "2015-05-19T19:30:20Z")

</div>

And just so that I look crazy, the Event Receive Activation/Deactivation/SearchStart is now working all of a sudden.

Sigh.

I am not sure what BTService is dependent upon, but it does not trigger in all conditions it seems. When my BT executes Idle (lowest priority node) BTS does not trigger.  
Yet if I manually set some BB keys and let the AI run with usual then I see BTS activates upon completion of the highest priority node.

---

<div class="post-metadata">

**Author:** ![kamrann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kamrann](https://forums.unrealengine.com/u/kamrann)\
**Post date:** [May 19, 2015, 11:54pm UTC](https://forums.unrealengine.com/t/btservice-event-receive-tick-signature-differs-compile-error/319075/8 "2015-05-19T23:54:05Z")

</div>

The way you are deriving and using the service is fine. The reason Mieszko suggested you may be doing something wrong was just that he thought you were deriving it in C++. Since you’re not, the issue really is that you are syncing to the master branch. Stuff is being committed there all the time and it’s to be expected that things will get broken regularly.

If you want to develop without these problems, just sync to a more stable branch such as 4.8.0-preview-2 (tag) or release.
