Example say i have a door placed on a custom map and i can get the entity. is there any way to add the ablilty to take damage to the door again?
Add damage back to mapEntitySolved
All doors is BaseCombat entity, all of them have BaseProtection settings that you can edit
Im seting example a stone gate all its baseProtection.amount[] to 0.0f but still unable to damage it.
Drop here your codeTs3hostingIm seting example a stone gate all its baseProtection.amount[] to 0.0f but still unable to damage it.
private void OnHammerHit(BasePlayer player, HitInfo info)
{
BaseCombatEntity door2 = info?.HitEntity as BaseCombatEntity;
if (door2 != null)
{
ProtectionProperties protection = door2.baseProtection;
if (protection != null)
{
protection.OnValidate();
protection.Clear();
}
}
} Orange
Drop here your code
Its working but seems to effect everything not just what i hit.
Ts3hostingIts working but seems to effect everything not just what i hit.
Thats because you don't know what is reference types. Multiple objects can have same "protection settings", so when you edit one of them it changes on all of them
I got it.
Locked automatically