theCapypara / GMnet-ENGINE

A multiplayer/networking engine for Game Maker Studio

Home Page:https://gmnet-engine.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sync_in() not working like i expect?

dushiel opened this issue · comments

It seems to me that the sync_in() function does not work when its being done from a client side (so, htme_islocal()= false). Is this how it should work?

The other way around works perfectly fine for me; on the server side if i update the variable with sync_in() the client side gets to see the changes. So how can i change a variable in a server object from the corresponding client object?

Everything else works fine

sync_in is a one way script. You can only sync in from the machine which the objects was created and synced on (local). You can not sync in a remote object to the local object.

You can however create an object on the client and sync to the other players. But the other player can't sync in that object to you.

If you want to change a variable or send a command to another client you need to use RPC. Or create a local synced object that the other can read and execute the commands you want.