Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AI seems to not replicate (Does not work in multiplayer)

I am trying to make AI work in multiplayer if there is a way to ensure it running on the server that would be great.

  1. My character and controller are connected and some features do work, i have found that the ai characters can still see my character.

  2. I have set everything to replicates and always relevant for now to try and force it to work on multiplayer (Within the ai character and ai controller)

  3. The movement seems to not work other stuff seems to work (For the most part)

My question is how would I go about forcing MoveTo to replicate/execute on server. I have tried making AI Tasks using switch has authority on moveto to no prevail.

Please do not respond with a quick start guide to AI, I have looked at many guides and answer threads none seem to help.

EDIT AND PLEASE NOTE: All AI functions work in single player, it is not an issue with the actual logic just the moveto functionality or moving in general

Product Version: UE 4.15
more ▼

asked Apr 22 '17 at 02:09 PM in Blueprint Scripting

avatar image

1 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

It doesn't work in any of the engines simulations/launchers it only works if you use the "Standalone Game" as the Play Mode.

more ▼

answered Apr 30 '17 at 04:04 PM

avatar image

1 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I think you are using more variables into the characters, have you tried by setting them to be replicated? I'm not talking about the actors, I'm talking about the position, boolean values, etc.

For example this is a variable:

alt text

Please let me to know if that works. If not, I can give you more help :)

borrar.png (20.5 kB)
more ▼

answered Apr 26 '17 at 05:50 PM

avatar image

382 21 15 23

avatar image durkaderk Apr 26 '17 at 09:09 PM

As of now the AI uses no variables within the character. It only uses blackboard variables and one replicated controller variable. Also my issue is not replication as I have been able to confirm AI perception does indeed work. My problem is that the MoveTo function does not seem to replicate/work in multiplayer.

I guess to rephrase is there a way to make sure bb/bt replicates? Like if there is an option.

avatar image Erumaru Apr 27 '17 at 05:31 AM

bb\bt exist only on server and all logic of AI work only here.

avatar image durkaderk Apr 27 '17 at 12:23 PM

Then why doesn't moveto work?

I know everything is already on the server but I replicated everything again just in case. Is there a multiplayer ai example project or something that I could look at?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Please check at this answer, it may help you: Server Replication

more ▼

answered Apr 27 '17 at 01:33 PM

avatar image

382 21 15 23

avatar image durkaderk Apr 27 '17 at 02:17 PM

My issue is either with AI Behavior Trees or Navmeshes. I checked that page and your advice would help if I was doing something else. Im using AI Moveto.

What works: Variable Replication Controller Possession AI Perception and Replication

What doesn't work: AI MoveTo / Pawn Movement Input

My question is not about replication in general its about the specific moveto in the ai behavior tree

avatar image looter Aug 09 '17 at 12:06 AM

Did you ever solve this issue? experiencing the same thing on 4.17 release

avatar image DK Buzzin Jan 01 '19 at 05:03 AM

People that answer have obviously never tried to get AI to work with multiple people playing. I have an AI that works great when playing as the server but seems to ignore all clients. I am using a vision check via blueprints and not pawn sensing. I will probably have to switch over. Another thing I will try is to code all the AI's decision making and logic in the AI_Character_BP instead of using a behavior tree.

avatar image FuTou Feb 09 '19 at 12:36 PM

It's interesting and I'm going to want your result of trying. Why I say it's interesting? I bought some AI blueprint asset from marketplace, and everything just worked with multiplayer, which is amazing, yet I don't know what it did to achieve this, since there's nothing special I saw, and there was no documentation.

avatar image Chosker Feb 22 '19 at 10:45 AM

hi, did you find a way to get it working?

if I remember correctly it won't replicate because ultimately it is not owned by a playercontroller.

I don't yet have a solution but I am currently just facing this issue now. I will report back if I can find a way to get it working.

I too am making my AI logic directly in my AIController blueprint instead of using a behavior tree btw. so we're pretty much on the same page here

avatar image Chosker Feb 22 '19 at 11:03 AM

btw I remember from another project that SimpleMoveToActor and SimpleMoveToLocation simply does not work on clients. For that to work there I had to manually get a path and add movement to the Pawn. I suspect it will be the same issue here

avatar image Chosker Feb 23 '19 at 10:17 AM

I tried using 'Simple Move to Location' instead of 'Move to Location' and it works over the net ... and oddly enough, 'Move to Location' seems to also work over the net

avatar image DK Buzzin Mar 29 '19 at 03:05 AM

Right now I have a homemade ai system done completely in blueprints. It works for multiplayer but I am NOT using any behavior tree. My AI are not the smartest at the moment, but they are able to wander, chase, attack, return to wander, die, respawn, etc.

My next challenge is to create variants of this simple base of behavior. For example a mob that once one "wolf" sees the player, all wolfs around will aggro the seen player. Another example would be to flee when the AI is low on health.

Lastly, I have a dragon that I got on the marketplace for free. It has a bunch of flying animations. I hear that programming flying AI is a total headache. Any good links you guys know of to learn from send my way.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question