I am scripting an ability for a monk archetype that allows the monk to gain a Burrow speed equal to his full land speed when activated. I can get everything to work as needed, except that it always uses the Monk's base land speed instead of his full adjusted speed. Here's the code I've been using:
When activated, it correctly adds Burrowing, but at the base land speed of the monk, and also deactivates correctly. I know tSpeedMod is calculated in Final but perhaps my exact timing is off from where the bonuses are actually added, but that doesn't seem right.
Code:
Final/10000
doneif (tagis[Helper.SpcDisable] <> 0)
field[abValue].value = hero.child[Speed].field[tSpeedMod].value
#value[xBurrow] = field[abValue].value
perform hero.child[xBurrow].assign[Helper.SpcDisable]
perform hero.child[xBurrow].assign[Hide.Special]
if (field[abilActive].value = 0) then
perform hero.child[xBurrow].assign[Helper.SpcDisable]
perform hero.child[xBurrow].assign[Hide.Special]
endif
if (field[abilActive].value = 1) then
perform hero.child[xBurrow].delete[Helper.SpcDisable]
perform hero.child[xBurrow].delete[Hide.Special]
endif
When activated, it correctly adds Burrowing, but at the base land speed of the monk, and also deactivates correctly. I know tSpeedMod is calculated in Final but perhaps my exact timing is off from where the bonuses are actually added, but that doesn't seem right.