Other Client Instance Coordinates

Posted by JamSnack
I would like to know how I would be able to synchronize my instances with the same position of the instances of that of the gms_instance_get_owner()'s specific instance. I have been working on this for a while and I just can't seem to find a solution.

What I am trying to achieve with this task is the non-owned npcs to mp_step towards their syncd npcs in their owner's client. With my current code I have gotten this to work only when joining a game with existing npcs, and it seems to get less accurate the longer the session lasts. My npcs are fully synchronized as well but I cannot find a solution to this problem.

If you need my code please ask.

Thank you.

Replies (2)

Last message on 3 Jan 2018

Chibi on 2 Jan 2018, 22:03:12
I'm not pretty sure if you are talking about pathfinding or anything related with it.
So, they are fully synced because when you join a room with existing npc's it seems to work.
I don't really understand if you pretend to create them with one client and making sure that the other ones see, if that's the case you'll probably have to use <code> gms_instance_sync() </code> without really caring about the owner (just because the owner var is synced it doesn't mean you've got to use it).
I still think that it would be less difficult if I had a chance to see your code.
Hope I helped :)
Size43 (Administrator) on 3 Jan 2018, 11:51:25
You should only move instances when gms_instance_is_owner() is true.

Movements from other clients will not be synced, and the object will start glitching.