I am having an issue with a template that is lowering a base creature's intelligence.
My template lowers the hero's Int by 4. If it lowers it to 0 or below I want to assign Helper.NoScore to aINT. The script is simple enough, but I am having an issue with the timing.
Here is the script
The issue is that a validation rule gets triggered if the templated creature's intelligence is lower than 0. However, if I try to move the script to early enough that the validation rule doesn't get triggered, then my script will always run and assign Helper.NoScore to aINT no matter what it's value is.
What timing can I run this so that this doesn't happen?
My template lowers the hero's Int by 4. If it lowers it to 0 or below I want to assign Helper.NoScore to aINT. The script is simple enough, but I am having an issue with the timing.
Here is the script
Code:
if (#attrvalue[aINT] <= 0) then
perform hero.child[aINT].assign[Helper.NoScore]
endif
The issue is that a validation rule gets triggered if the templated creature's intelligence is lower than 0. However, if I try to move the script to early enough that the validation rule doesn't get triggered, then my script will always run and assign Helper.NoScore to aINT no matter what it's value is.
What timing can I run this so that this doesn't happen?