View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old June 12th, 2017, 05:59 AM
I had to fiddle a bit - seems like if the script is run in the early timing phases gets overwritten by the base race. When I was initially testing I was running the script without a base race selected yet so it would work until I selected a race....

So when I put the following in at Render 10000

if (field[abilActive].value <> 0) then
herofield[tReach].value += 5
endif

It seems to "work", the basic pane gets the 10' reach, but when you debug the individual weapons, they are stuck at 5' reach.
So as a hack I stuck the original weapon code after it and now both update. So final script running at Render 10000 (and it stays working after a client restart) is:
Code:
if (field[abilActive].value <> 0) then
  ~ adjust personal reach
  herofield[tReach].value += 5
  ~ adjust all the weapons
  foreach pick in hero from BaseWep where "wCategory.Melee"
    eachpick.field[wReach].value += 5
  nexteach
endif
It's always a PITA to figure out timing since there are so many moving parts. I'm pretty sure you could put the tReach code in somewhere earlier and you wouldn't have to use the weapon wReach code...
dungeonguru is offline   #11 Reply With Quote