I have the made 2 lines of codes, which works perfectly in the ARK Dev Kit, but when testing it in game it didn’t work. Both of the codes are placed in the PlayerController.
This is a function which spawns in a dino, which you can play, it is triggered by a button in a widget . This function is Excecuted on server and Reliable. In the editor I tested it on Dedicated and Non-Dedicated with 2 players. The Client and Server were both able to spawn a dino.
People who play the mod tried it on a Non-Dedicated server. Only the Server was able to spawn the dino, the Client couldn’t do anything. How do I get it to work in game? Will it work on a Dedicated server, or will it be the same as on Non-Dedicated?
This function is called when clicking RMB. The function is Excecuted on server and Reliable. It simply tames all Direwolves in a range when playing as a Direwolf. (You howl and wolves will join your pack). First it checks if the Direwolves aren’t tamed by any other player yet.
I tested it in the Ark Dev Kit by placing 2 Direwolves in the TestMap and pressing RMB, this worked and the Direwolves were tamed. Sometimes it did’t work at the exact moment, but after pressing RMB 2/3 times. I thought this was caused by all the loops.
In game I tested it, but the wolves were not tamed, instead the attacked me like usual. I also could not see the message at the end of the code because that part of my HUD has disapeared, but that another thread/problem. So I am not sure if the last piece of code is excecuted.
I think the problem is caused by the last piece of the code, but I am not sure. What is wrong with the code?
Thanks in advance for answering! If you found some other improvements in the code, please let me know.