Senior Member
Join Date: Feb 2013
Posts: 357
|
Working on a template that reduces some stats, but not below 3. I think I have the right code, but it isn't working.
Code:
var intval as number intval = minimum(hero.child[aINT].field[aNormal].value-3,6) hero.child[aINT].field[aNormal].value -= intval |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,146
|
Quote:
Code:
var intval as number intval = hero.child[aINT].field[aNormal].value-6 hero.child[aINT].field[aNormal].value = maximum(intval,3) |
|
#2 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
I'll give it a try
|
#3 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
Ok, what I have is:
Code:
Phase=Preattributes, Priority=10000 var intval as number intval = hero.child[aINT].field[aNormal].value-3 intval = minimum(intval,6) hero.child[aINT].field[aNormMod].value -= intval |
#4 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
Quick pointers, i hope they help
If Phase is Pre-Attributes, attributes have not yet been determined, so you cannot manipulate them. Timing should be later (Post attributes?) minimum(interval,6) would return the lowest value between int-3 and 6, which doesn't sound like what you're gunning for here. Use maximum (int-3,3) instead |
#5 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
It actually is. I was trying to find whichever was lower, int-3 or 6, and applying that as a modifier to the final score
|
#6 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
|
#7 |
Thread Tools | |
Display Modes | |
|
|