WASTED

WASTED

檢視統計資料:
king bore haha 2017 年 7 月 7 日 下午 5:37
Workaround for a ModifyHealthAction bug v2 (ARMOR_REDUCTION adds extra damage)
In case somebody else has also experienced the glitch where a ModifyHealthAction will directly add ARMOR_REDUCTION on top of damage dealt if the expression is a negative value.

(snip, see the second post for the improved version)

Just BuffAddAction this buff and then BuffRemoveAction it when the damage is done. I needed this myself for a consumable that damaged the player over time, because if they had, say, an Emma Grand, the damage over time would be quadruple what it should have been. Actvating this buff for the duration of the damage over time fixed the problem.
最後修改者:king bore haha; 2017 年 7 月 10 日 下午 10:41
< >
目前顯示第 1-1 則留言,共 1
king bore haha 2017 年 7 月 10 日 下午 1:07 
I was extremely unsatisfied with the previous workaround so I came up with a MUCH BETTER solution that works pretty similarly, but it only activates the ARMOR_REDUCTION null buff during the self damage, so the player will always retain the proper amount of ARMOR_REDUCTION on all of their weapons at all times.

local buff_gameobject = CreateGameObject("buff_null_armor_reduction") local buff = buff_gameobject.AddComponent("BaseBuff") buff.buffName = "hidden null armor reduction" buff.buffFlavorText = "" buff.buffDescription = "" buff.requiredTags = "" buff.attributeEffects = {BuffAttribute.Create("ARMOR_REDUCTION", "-1", true,"selfdamage"),} buff.conditionEffects = {} buff.maxStacks = 1 buff.levelClass = -1; buff.buffType = BuffType.Normal buff.buffPriority = BuffPriority.Normal buff.hideInConditionsList = false buff.nonSerialized = false buff.contextTags = "" buff.Register();

For this one to work, the ModifyHealthAction needs to contain
condition.contextTags = "selfdamage"
That makes the ARMOR_REDUCTION only be nullified during that single attack.

As before, whatever condition you have should BuffAddAction when the condition is added, and BuffRemoveAction it when the condition is removed.
最後修改者:king bore haha; 2017 年 7 月 10 日 下午 1:10
< >
目前顯示第 1-1 則留言,共 1
每頁顯示: 1530 50