Results 1 to 4 of 4

Thread: Spawn points Random gem

  1. #1
    Refugee
    Join Date
    Jan 2017
    Posts
    12
    Rep Power
    0

    Spawn points Random gem

    Hi guys,

    After a search without success, I would ask someone to help me with this issue. There is some possibility to create a single spawn point for players inside a server in Random gem. I know how to do it in navezgane by modifying spawnpoints.xml, but in random gem it does not work the same. Thank you.

  2. #2
    Community Moderator SylenThunder's Avatar
    Join Date
    Oct 2014
    Location
    SE Michigan, out in the sticks.
    Posts
    7,250
    Rep Power
    1
    Outside of using a manager to control this, I am not seeing anything.

  3. #3
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,857
    Rep Power
    1
    They are randomly generated and that's hardcoded in the dll.

    What you can do with an API mod is detect when they spawn into the game world, and teleport them to a point if it is their first time. I have most of this set up in my api mod and it should be included in the next release.

    something like this would probably do it:

    API.cs
    Code:
    namespace ApiModSpace
    {
      public class API : ModApiAbstract
      {
        private Vector3 spawnpoint = new Vector3(0,60,0);
        
        public override void PlayerSpawnedInWorld(ClientInfo cInfo, RespawnType respawnReason, Vector3i pos)
        {
          try
          {
            switch (respawnReason)
            {
              case RespawnType.Died:
                break;
    
              case RespawnType.Teleport:
                break;
    
              case RespawnType.EnterMultiplayer:
                cInfo.SendPackage(new NetPackageTeleportPlayer(spawnpoint));
    
                break;
    
              case RespawnType.JoinMultiplayer:
                break;
            }
          }
          catch (Exception e)
          {
            Log.Out($"Error in {GetType().Name}.{MethodBase.GetCurrentMethod().Name}: {e}");
          }
        }
      }
    }

  4. #4
    Refugee
    Join Date
    Jan 2017
    Posts
    12
    Rep Power
    0
    Thanks for the answer
    A greeting

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •