I have artificial intelligence made to chase players, but in multiplayer it doesn’t work, just chasing the host
-
I tried to get the player’s index, but what ends up not working
-
After that I send to the behavior to get the player’s index as well as in the images below
-
it returns only the index of the server and does not take the client “0”
How can I fix this?
Hi, in your images you set the “Player Index” variable to 0, on the server that’s always gonna be the server.
But why not just using a new blackboard key something like “Target Actor” and use that? So you would set that when the AI sees a new player with the reference of the sensed actor. Then you don’t need this workaround with the player index.
1 Like
For those who are having the same issue, setting the target actor that you will create in the behavior tree/blackboard to the actor that the AI perceived fixed the AI, preventing it from following only the server and having it follow server and the client as well