Sythius
04-19-2009, 03:10 PM
my current means of doing damage to the hp is this;
_root.bad = _root.bad-random(30);
if (bad<0) {
bad = 0;
}
As you can see.. This allows any number from 0-30 to damage the hp.
The hp is a Dynamic Text Field.
The Text Field's variable is "bad". As can be seen in the coding.
My problem is. I want to be able to do like .. a range...
like for an exmaple, 12-47.. so the min damage done is 12, the max is 47.. Can somebody please help me?
( The
if (bad<0) {
bad = 0;
just stops the hp going into like -12, etc. And keeps it to a minimum of 0.
}
thanks in advance.
_root.bad = _root.bad-random(30);
if (bad<0) {
bad = 0;
}
As you can see.. This allows any number from 0-30 to damage the hp.
The hp is a Dynamic Text Field.
The Text Field's variable is "bad". As can be seen in the coding.
My problem is. I want to be able to do like .. a range...
like for an exmaple, 12-47.. so the min damage done is 12, the max is 47.. Can somebody please help me?
( The
if (bad<0) {
bad = 0;
just stops the hp going into like -12, etc. And keeps it to a minimum of 0.
}
thanks in advance.