# Does the Behavior tree work in multiplayer?

**URL:** <https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412>\
**Category:** Blueprint\
**Tags:** Behavior-Tree, client-to-server, client-server, unreal-engine, Blueprint, question\
**Created:** [June 1, 2015, 7:31pm UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412 "2015-06-01T19:31:53Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [June 1, 2015, 7:31pm UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/1 "2015-06-01T19:31:53Z")

</div>

I’m doing an multiplayer based RTS game. Everything working on server but in client i can’t move characters. Client sees changes in server. After quick search in google i found move to location is not working in multiplayer. So i try behavior tree but its not working too. in 4.7.6 behavior tree is not running. Blackboard variable is not changing. in 4.8 p4 behavior tree is running blackboard variable changing but “MoveTo” not working. What should I do? i need move to actor and move to location. im doing multiplayer because im start to think add enemy in game. Dont know why but i think add enemy in game with multiplayer is better. if you want see my problem I have edited topdown project and put in dropbox.

> **[TopDownBP4.7.rar](https://www.dropbox.com/s/3l6fu8lus84v1z2/TopDownBP4.7.rar?dl=0)**
>
> Shared with Dropbox

> **[TopDownBP4.8.rar](https://www.dropbox.com/s/ndwrz4x867uoah7/TopDownBP4.8.rar?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [June 1, 2015, 8:05pm UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/2 "2015-06-01T20:05:45Z")

</div>

If the AI Pawn is set to replicate and replicate movement, he should normal replicate the position etc. Since he is spawned from serverside, you will want to only replicate the states he is in. Make replicated bools, for Attacking Animation etc that only the server changes. Since they are replicated, the client version will also get the update and the AnimationBP will show the correct animation. The Client doesn’t need to know about damage or something, the server will calculate that for him. so everything that happens in the behavior tree should be done on the server and only the position etc (though replicate movement bool of the pawn) should be replicated.

At least that’s how i imagine it. It’s been a time since i tested that.

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [June 2, 2015, 7:08am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/3 "2015-06-02T07:08:32Z")

</div>

thanks for answer but ai controller and character is replicated and movement replicated some variables replicated but still “MoveTo” not working in client…

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [June 2, 2015, 8:03am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/4 "2015-06-02T08:03:51Z")

</div>

You are sure that you call the MoveTo only serverside? And then the client version of the AI isn’t moving on client side? Have you tried creating your own BTTask and using the Move To Location or what ever it is called of the AI Cobtroller instead of the predefiened MoveTo?

---

<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:** [June 2, 2015, 8:10am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/5 "2015-06-02T08:10:29Z")

</div>

AI in unreal engine works only on the server, bu design. However we did introduce a way to have clients own an instance of `NavigationSystem` as well. Go to your project settings and set `Navigation System -> Allow Client Side Navigation`. This should allow you to use `Move To` calls on clients.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [June 2, 2015, 8:25am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/6 "2015-06-02T08:25:24Z")

</div>

Ok, i did not know that you could allow clientside movement. Ist that replicated or will the AI only move on client side?

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [June 2, 2015, 8:25am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/7 "2015-06-02T08:25:28Z")

</div>

im calling “MoveTo” only serverside i think. i didnt create any custom events. I tried to MoveToLocation in ai controller but its not working too.

---

<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:** [June 2, 2015, 8:28am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/8 "2015-06-02T08:28:25Z")

</div>

If you want to move AI you should always do that on the server. That’s the way UE4 AI is set up. If you want to use AI on clients then be prepared for handling multiple issues derived from that we don’t use AI that way.

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [June 2, 2015, 8:29am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/9 "2015-06-02T08:29:38Z")

</div>

with this in client side when im order to move somewhere character just turning around not moving and server not detect client character action but client detect server side.

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [June 2, 2015, 8:52am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/10 "2015-06-02T08:52:24Z")

</div>

Hm i guess at this point we could need a screenshot of your setup. Where you call the move to, how the tree looks and the tasks etc if you have some.

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [June 2, 2015, 9:11am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/11 "2015-06-02T09:11:19Z")

</div>

i edited topdown project and uploaded to dropbox but if you want screen shot no problem

in server there is no problem everything working.

in player controller (TopDown Project) im detecting move location and order to move. I am sending location to Character with interface then sending to AIcontroller(TopDownAI). In AI Controller with this setup Move to location is not working. Then I tried Behavior tree but its not working too. In behavior tree i created service its just printing blackboard variable “MoveLocation”. in world settings im using pawn for camera.

and character capsule component collision needs to be “overlap only pawn”

 ![44952-playercontroller.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/5/125f0cd95b289b6db880c10a96ab0d8a169cc254.jpeg)

 ![44954-chacater.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/f/47f4695ed00fb23f35c38328945ec814f43ee753.jpeg)

 ![44955-chardefault.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/c/71cf1c364a3a8892f050609052ef36ea1132b6a5.jpeg)

 ![44956-aicontroller.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/b/7abc2211c6d115f27307d67c08449ee7fa946c18.jpeg)

 ![44958-bt.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/5/1154fb785efed0ab6cb9ce413fbdaed2c6ecb4ef.jpeg)

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [June 2, 2015, 2:26pm UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/12 "2015-06-02T14:26:19Z")

</div>

any ideas?

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [June 2, 2015, 3:32pm UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/13 "2015-06-02T15:32:00Z")

</div>

Hey, please don’t bump question before they are unanswered for at least 4 days. Otherwise this will clutter the AnswerHUB and other people have problems getting their new questions seen.

For your problem i have no idea right now. MieszkoZ is the AI master here.  
Just wait for him to reply (:

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_89aad16d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_89aad16d](https://forums.unrealengine.com/u/anonymous_user_89aad16d)\
**Post date:** [September 19, 2021, 3:42am UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/14 "2021-09-19T03:42:50Z")

</div>

bump, 6 years later

---

<div class="post-metadata">

**Author:** ![mjkjx34](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mjkjx34](https://forums.unrealengine.com/u/mjkjx34)\
**Post date:** [May 4, 2026, 3:17pm UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/15 "2026-05-04T15:17:25Z")

</div>

Any tips on how to handle authority switching of AI?

---

<div class="post-metadata">

**Author:** ![tyconner](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tyconner/32/1203517_2.png) [@tyconner](https://forums.unrealengine.com/u/tyconner)\
**Post date:** [May 5, 2026, 12:44pm UTC](https://forums.unrealengine.com/t/does-the-behavior-tree-work-in-multiplayer/320412/16 "2026-05-05T12:44:12Z")

</div>

I see this was necro’d but I actually have the solution to this as a guide on my profile. It’s a pretty easy fix actually: [Setting Up The Top Down Template For Multiplayer | Epic Developer Community](https://dev.epicgames.com/community/learning/tutorials/pv56/unreal-engine-setting-up-the-top-down-template-for-multiplayer)
