S
Spencer S
Guest
When I put something like this into the Create event of an object:
Will the entire function update if I change a variable that is in that function? For example, if I change the playerToughness value, will this entire for loop run again and update all values, even though its located in the Create event?
Essentially, my bare bones question is this: if I have a for loop that uses previously created variables in the Create event, and I change one of those variables, will that loop located in the Create event execute again, just once, to update the other values located inside that for loop?
Code:
{
var j;
var toughnesshp = 5.00;
var toughnessiteration = 0.00;
for (j = 0; j < playerToughness; j ++) {
toughnessiteration = toughnessiteration + toughnesshp;
if playerToughness >= 20 {
if toughnesshp > 2.00 {
toughnesshp = toughnesshp * 0.96;
}
else toughnesshp = 2;
}
}
}
Essentially, my bare bones question is this: if I have a for loop that uses previously created variables in the Create event, and I change one of those variables, will that loop located in the Create event execute again, just once, to update the other values located inside that for loop?