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.
Remove ability to respawn at bed/sleeping bag?
Discussion in 'Rust Development' started by *VIC, May 23, 2016.
-
It is really simple, use the OnPlayerRespawned hook and teleport the player to where ever you want.
-
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?
-
Wulf Community Admin
-
I'm wondering if I can use this SleepingBag.FindForPlayer() function and set the deployerUserID to a null string or something.
[DOUBLEPOST=1463968122][/DOUBLEPOST]Last edited by a moderator: May 23, 2016 -
If you don't plan on using them why not just destroy them on spawn, or block them completely
-
-
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.
-
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; }
-
-
How to see this differnce?