This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:sendmversemsg [2021/06/14 16:02] – created virgilw | 4rpl:commands:sendmversemsg [2024/10/06 09:37] (current) – kalli | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Description ===== | ===== Description ===== | ||
- | Similar to SendMsg, except the message is sent to other clients in an mverse session. Note that the message will NOT be sent to client doing the sending. It is only sent to other clients. The data can be any 4rpl data type, including a list or a table. Care should be taken to not call SendMVerseMsg more than necessary or with more data than necessary since the call sends a message across the network to all clients. | + | Similar to [[SendMsg]], except the message is sent to other clients in an mverse session. Note that the message will NOT be sent to client doing the sending. It is only sent to other clients. The data can be any 4rpl data type, including a list or a table. Care should be taken to not call SendMVerseMsg more than necessary or with more data than necessary since the call sends a message across the network to all clients. |
===== Examples ===== | ===== Examples ===== | ||
Line 18: | Line 18: | ||
SendMVerseMsg(" | SendMVerseMsg(" | ||
</ | </ | ||
+ | |||
+ | <code 4rpl> | ||
+ | # Many 4rpl custom unit actions are not automatically synced in mverse. | ||
+ | # For stationary units a possible solution is to send an mverse message | ||
+ | # so that the other player sessions can create a clone of the unit. | ||
+ | |||
+ | < | ||
+ | " | ||
+ | |||
+ | :once | ||
+ | RegisterForMsg(" | ||
+ | |||
+ | : | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | See [[RegisterForMsg]] | ||
+ | |||
+ | |||
< | < | ||