User Tools

Site Tools


4rpl:commands:sendmversemsg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:sendmversemsg [2024/10/06 09:33] – [Examples] kalli4rpl:commands:sendmversemsg [2024/10/06 09:37] (current) kalli
Line 21: Line 21:
 <code 4rpl> <code 4rpl>
 # Many 4rpl custom unit actions are not automatically synced in mverse.  # Many 4rpl custom unit actions are not automatically synced in mverse. 
-# For stationary units a possible solution is to have the unit send an  +# For stationary units a possible solution is to send an mverse message  
-mverse message so that the other player sessions can create a clone  +# so that the other player sessions can create a clone of the unit.
-of the unit.+
  
-# In the custom unit script: +<-unitType <-unitPos <-unitSettings createunit 0 SetMVerseCreatesUnitGhost
-:awake +
-self getunittype ->unitType +
-self getunitposition ->unitPos +
-self getunitsettings ->unitSettings+
 "MVMSG_CreateUnit" <-unitType <-unitPos <-unitSettings 3 listN sendmversemsg "MVMSG_CreateUnit" <-unitType <-unitPos <-unitSettings 3 listN sendmversemsg
  
-# In a global script: 
 :once :once
 RegisterForMsg("MVMSG_CreateUnit" "MVMSG_CreateUnit_Function") RegisterForMsg("MVMSG_CreateUnit" "MVMSG_CreateUnit_Function")
4rpl/commands/sendmversemsg.1728221630.txt.gz · Last modified: 2024/10/06 09:33 by kalli