1. I'm looking for a way to do this. So far, I'm having trouble finding where I can access a player's available spawn locations. I've looked around in BasePlayer, SleepingBag, and SpawnPoint's so far, but I haven't got anything working. My goal is to make it so that I have full control over where players are able to spawn.
     
  2. It is really simple, use the OnPlayerRespawned hook and teleport the player to where ever you want.
     
  3. Hmm. I've messed around with that hook but the player's bag locations still show up in the death screen. Is there a way to remove the bags/beds from this screen?
     
  4. Wulf

    Wulf Community Admin

    Not really, unless you can overlay some custom UI box over it. Also, if you want an example of the hook mentioned, my Respawner plugin pretty much does what you want.
     
  5. Thanks, I'll definitely take a look at your plugin.

    I'm wondering if I can use this SleepingBag.FindForPlayer() function and set the deployerUserID to a null string or something.
    [DOUBLEPOST=1463968122][/DOUBLEPOST]
    I used this method and set the deployerUserID to null and it cleared all my bags from the death screen. I'm not sure if this will work for a bag that has been reassigned though.
     
    Last edited by a moderator: May 23, 2016
  6. If you don't plan on using them why not just destroy them on spawn, or block them completely
     
  7. In my mod, I'm still making use of them, but I'm using them for a purpose other than a respawn point.
     
  8. Yeah setting its ownerId to null would work I think. Maybe you could null it and set it to its correct ownerid when you need it to be available.
     
  9. Try to change the Singleton Component^^
    I got no idea if this is writable, but its all public,no internals...could work...
    I would easy try remove the prefabs...and see what happens :)

    Code:
    using System;
    using UnityEngine;public class UIDeathScreen : SingletonComponent<UIDeathScreen>
    {
        public GameObject sleepingBagIconPrefab;    public GameObject sleepingBagContainer;    public LifeInfographic previousLifeInfographic;    public Animator screenAnimator;    public bool fadeIn;
    }
    
     
  10. Pretty sure that's client-side code, which means modifying it will have no noticeable effect.
     
  11. How to see this differnce?
    As i have learned now, you should be right with this, thats client...but i needs only to be escpecially network-controlled, then it'S OWNED :p