A networked spawner for weapons.
Spawnable via "worldInfo:CreateWeaponSpawner(name, pos)". IMPORTANT: Spawners are networked, and therefore should ONLY be created on the host. Trying to create them on the client may result in issues.
public string GetSpawnWeapon()
(Server) Get the name of the weapon that is set to spawn.
Returns: (string) The weapon name.
public void SetSpawnWeapon(string name)
(Server) Set the weapon that is set to spawn.
Arguments
public bool GetActive()
(Server) Gets whether this spawner is active.
Returns: (bool) Whether this spawner is active.
public void SetActive(bool active)
(Server) Sets whether this spawner is active.
Arguments
public float GetCooldown()
(Server) Gets the cooldown between spawns on this spawner.
Returns: (float) The cooldown.
public void SetCooldown(float cooldown)
(Server) Sets the cooldown between spawns on this spawner.
Arguments
public int GetMaxSpawns()
(Server) Gets the max amount of spawns on this spawner.
Returns: (int) The maximum spawn count.
public void SetMaxSpawns(int amount)
(Server) Sets the max amount of spawns on this spawner.
Arguments
public float GetTimeLeft()
(Server) Gets the time left until the next spawn.
Returns: (float) The time left.
public int GetSpawnsLeft()
(Server) Gets the amount of spawns left before the spawn limit is reached.
Returns: (int) The spawns left.
public bool IsOnCooldown()
(Server) Checks whether this spawner is currently waiting to spawn.
Returns: (bool) Whether this spawner is currently on cooldown.
public bool IsOutOfSpawns()
(Server) Checks whether this spawner has reached the spawn limit.
Returns: (bool) Whether the spawner has reached the spawn limit.