iv gotten the doors health to increase and that includes the High External Gates but now im stumped for how to increase the High External Walls Health
Does anyone know how to increase the health of external walls?
Check for their prefab when they spawn and boost the health.
ZugzwangCheck for their prefab when they spawn and boost the health.
so how would i make that work as a plugin? since even if you add them into the plugin BuildingHealth the changes aren't applied, the only thing i can guess is it might work with this block of code for a script i found from a old post talking about manipulating door health, but im not sure how i would apply the changes to this script to make it effect external walls.
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Oxide.Plugins
{
[Info("Door Health Multiplier", "N/A", "1.0.0", ResourceId = 675)]
class DoorHealthMultiplier : RustPlugin
{
bool started = false;
void OnServerInitialized()
{
started = true;
foreach (Door d in BaseNetworkable.serverEntities.Where(x => x is Door && (x as BaseEntity).OwnerID != 0))
{
(d as BaseCombatEntity)._maxHealth *= 8f;
(d as BaseCombatEntity).health *= 8f;
d.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
}
}
void Unload(Door entity)
{
foreach (Door d in BaseNetworkable.serverEntities.Where(x => x is Door && (x as BaseEntity).OwnerID != 0))
{
(d as BaseCombatEntity).health /= 8f;
(d as BaseCombatEntity)._maxHealth /= 8f;
d.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
}
}
private void OnEntitySpawned(Door entity)
{
if (started && entity.OwnerID != 0)
{
entity._maxHealth *= 8f;
entity.health *= 8f;
}
}
}
}