devomage
Member
I'm having a problem with attributes. I have a trigger that when I enter the trigger an attribute is changed to increase and decrease on exit. If I enter/exit the trigger several times it seems to increase the rate of increase each time. any suggestions?
this function is called each time enter/exit the trigger:
this function is called each time enter/exit the trigger:
C#:
public void SetLeyRegen()
{
if (m_Character.Profession != MS_ProfessionType.Arcanist) return;
var Ley = m_AttributeManager.GetAttribute("Ley");
//set to lock
var autoUpdateAmount = 0f;
var autoUpdateValueType = Opsive.UltimateCharacterController.Traits.Attribute.AutoUpdateValue.None;
//Ley.CancelAutoUpdate();
if (!m_Character.IsLeyLocked)
{
autoUpdateAmount = LeyPerRegen;
if (m_Character.InPool)
{
autoUpdateValueType = Opsive.UltimateCharacterController.Traits.Attribute.AutoUpdateValue.Increase;
}
else
{
autoUpdateValueType = Opsive.UltimateCharacterController.Traits.Attribute.AutoUpdateValue.Decrease;
}
}
Ley.AutoUpdateAmount = autoUpdateAmount;
Ley.AutoUpdateInterval = AutoUpdateInterval;
Ley.AutoUpdateStartDelay = 0;
Ley.AutoUpdateValueType = autoUpdateValueType;
}