lingzya_02521_460980 Yeah this is not a bad idea, it doesn’t even have to be invisible you could just spawn it under the ground and when it’s finished I guess reward the player in some other way.
OR you could just create a gameobject on the server and add the InteractableBeacon to it maybe? I don’t think you need to place an actual barricade and this could just work. Something like:
GameObject gameObject = new GameObject();
// position inside the navigation (where zombies can walk), could be the player's current position
gameObject.transform.position = player.transform.position;
InteractableBeacon interactableBeacon = gameObject.AddComponent<InteractableBeacon>();
ItemBarricadeAsset beaconAsset = Assets.find(EAssetType.Item, 1194) as ItemBarricadeAsset;
interactableBeacon.updateState(beaconAsset);
I don’t know if this will work or not. You have to figure out and try it yourself. You should check the following classses:
Remember that horde beacon automatically gets destroyed when player leaves the navigation area where the horde beacon started. You can see it in this part of code from InteractableBeacon
private void Update()
{
if (!Provider.isServer)
{
return;
}
if (Time.realtimeSinceStartup - this.started < 3f)
{
return;
}
if (this.isRegistered)
{
for (int i = 0; i < Provider.clients.Count; i++)
{
SteamPlayer steamPlayer = Provider.clients[i];
if (!(steamPlayer.player == null) && !(steamPlayer.player.movement == null) && !(steamPlayer.player.life == null) && !steamPlayer.player.life.isDead && steamPlayer.player.movement.nav == this.nav)
{
return;
}
}
}
BarricadeManager.damage(base.transform, 10000f, 1f, false, default(CSteamID), EDamageOrigin.Horde_Beacon_Self_Destruct);
}