void OnSetActorFaction(ref MyEventSetActorFaction msg)
 {
     var actorEnum = (MyActorEnum)msg.ActorId;
     if (MyMwcEnums.IsValidValue(actorEnum))
     {
         MyScriptWrapper.SetActorFaction(actorEnum, msg.Faction);
     }
     else
     {
         Alert("Actor enum invalid", msg.SenderEndpoint, msg.EventType);
     }
 }
        public void SendSetActorFaction(MyActorEnum actor, MyMwcObjectBuilder_FactionEnum faction)
        {
            var msg = new MyEventSetActorFaction();
            msg.ActorId = (int)actor;
            msg.Faction = faction;

            Peers.SendToAll(ref msg, NetDeliveryMethod.ReliableOrdered);
        }