MANUAL for GMnet ENGINE and GMnet CORE

Local and remote Instances

When you place an instance of an object into a room, that is set up to be be synced via GMnet ENGINE (mp_sync(); called in the create-Event), you will have one local instance of this object in your room, and one remote instance for each other player you are connected to.

That means, if you place one instance of object A in your room, you will have 4 instance if 4 players are playing. Each player has one local instance he controls, and the three other instances that the other players control.

You can find out if a instance is local by using htme_isLocal(); by using this if-Statement:

if (htme_isLocal()) {
 //Bla
}

everything in the statement will only be executed once for every player, by the instance that he controls.

If you place 2 instances of an object into the room, you will have 8 instances with 4 players, of which 2 are local and the above code will be executed by these two instances.


Back to index.


Creative Commons License

All pages in this manual are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Manuals / GMnet ENGINE Manual

GameMaker: Studio is owned by YoYoGames. GMnet is not affiliated with YoYoGames.
The GMnet logos use icons from Entypo (http://entypo.com/) and Open Iconic (https://useiconic.com/open/). They are licensed under CC BY-SA 4.0.