Member
Join Date: Jun 2010
Posts: 90
|
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. |
#1 |
Member
Join Date: Jun 2010
Posts: 90
|
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 by Jhalad; September 20th, 2010 at 05:55 PM. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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. |
#3 |
Member
Join Date: Jun 2010
Posts: 90
|
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. |
#4 |
|
|