Changes

Jump to navigation Jump to search
→‎Send messages: update for SMAPI 3.3 release
Line 88: Line 88:     
===Send messages===
 
===Send messages===
You can send a message to mods on other players' computers using the <tt>SendMessage</tt> method. The destination can range from very narrow (e.g. one mod on one connected computer) to very broad (all mods on all computers).
+
You can send a message to mods on all connected computers (including the current one) using the <tt>SendMessage</tt> method. The destination can range from very narrow (e.g. one mod on one connected computer) to very broad (all mods on all computers). The message won't be sent back to the mod instance that sent it, but it can be sent to the same mod on other computers.
    
When sending a message, you must specify three things:
 
When sending a message, you must specify three things:
Line 106: Line 106:  
this.Helper.Multiplayer.SendMessage(message, "MyMessageType", modIDs: new[] { this.ModManifest.UniqueID });
 
this.Helper.Multiplayer.SendMessage(message, "MyMessageType", modIDs: new[] { this.ModManifest.UniqueID });
 
</source>
 
</source>
  −
{{SMAPI upcoming|3.3|Messages are also sent to the current computer if applicable.}}
      
===Receive messages===
 
===Receive messages===
translators
8,445

edits

Navigation menu