okay yes i get that but the problem is how would i do it so that it only happens at the end of a turn? from what i see about this code:
if (effect1 == true){
e1health -= 10
}
is that for as long as effect1 is true it will continually take 10 health off of e1health. But i want it to do it once a turn for certain amount of turns which corresponds with my other variable (turn) and i am very confused as to how i would
do this
edit: alright so i sort of fixed it by adding a new variable:
var effect_turn:Boolean = false;
than after every turn i said that effect turn would be true, and than i changed effect1 == true code to:
if (effect1 == true && effect_turn == true){
e1health -= 10;
effect_turn == false;
}
now if i would add a timer, and put a timer +=1 in side the top code and say that if timer = blank amount that effect would be false… would that work? let me test this 1 minute.
alright it works! okay guys this is solved thanks anyway
|