Hey guys... If I create a spawn using for example a void like this how do I kill it outside of this void? For example like this... (obviously this doesn't work)..
Thanks. :)
void OnServerInitialized()
{
timer.Once(1, () =>
{
void spawn();
});
timer.Once(60, () =>
{
void despawn();
});
}
void spawn()
{
var lootbarrel = GameManager.server.CreateEntity("assets/bundled/prefabs/radtown/loot_barrel_1.prefab", 100, 15, 100);
NextTick(() =>
{
lootbarrel.Spawn();
});
}
void despawn()
{
NextTick(() =>
{
lootbarrel.Kill();
});
}Thanks. :)