• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Modifying speed

Jhalad

Well-known member
I've been adding new items to the Adjust tag, and am currently working on Expeditious retreat. I'm trying to add 30 ft. of movement to a target when the spell is activated. The current code I'm using is:


~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ Add to our base speed.
hero.child[Speed].field[tSpeed].value += 30

I've also tried:


~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ Add to our base speed.
hero.child[Speed].field[tSpeedMod].value += 30

I've tried activating each of these codes at various phases with no effect. The program accepts the line of code, but nothing occurs when I activate the spell.

So, am I doing something wrong, or am I trying to do something that just isn't possible right now? Thanks for any advice.
 
Got it!

~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

~may not move
hero.child[Speed].field[tSpeed].value += 30

Any suggestions on how I get encumbrance to modify the new speed?
 
Last edited:
What phase and priority is your script at?

Encumbrance is checked early in the final phase, if I remember correctly, so if you alter [tSpeed] before then, encumbrance should modify the adjusted speed.

Normally, tSpeedMod is used, rather than tSpeed, for things like spells, that are modifiers to the speed - tSpeed is generally only set by the race itself.
 
In the words of Cartman... "Sweeettt!"

Yup, changing the timing from 20k to 10 worked. Thanks Mathias!

And yeah, I had to use tSpeed because Expeditious Retreat affects base speed, not speed after encumbrance.
 
Back
Top