I have scripted one or two feats that modify combat states and haven't had any real difficulties so far. However, I have found a situation I am having problems trying to code.
The feat is written as increasing the base speed of the character by 10 feet when taking the Charge, Run, or Withdraw actions. After taking a look at the combat states and such, I tried out this bit of code:
This had no visible effect when the state was toggled on and off. I'm not sure if it's a coding issue or a timing issue. Any suggestions or insights?
The feat is written as increasing the base speed of the character by 10 feet when taking the Charge, Run, or Withdraw actions. After taking a look at the combat states and such, I tried out this bit of code:
Code:
Post-levels/20000
if (#hascondition[pstChargin] = 1) then
if (field[abilActive].value = 1) then
hero.child[Speed].field[tSpeedMod].value += 10
endif
endif
if (#hascondition[pstWithdr] = 1) then
if (field[abilActive].value = 1) then
hero.child[Speed].field[tSpeedMod].value += 10
endif
endif
if (#hascondition[pstRunning] = 1) then
if (field[abilActive].value = 1) then
hero.child[Speed].field[tSpeedMod].value += 10
endif
endif
This had no visible effect when the state was toggled on and off. I'm not sure if it's a coding issue or a timing issue. Any suggestions or insights?