Sgt. Sparky wrote:oi!
that is not what it did when I used my code!
y = palkki.y - height / 2;
population = - (x - 100) * 5;
if(x < -100)x = -100;
if(x > 100)x = 100;
x = 100;
if(change == 0 && x > -100)change = 1;
if(change == 1) {
y = palkki.y + height / 2;
population = (x + 100) / 4;
if(x < -100)x = -100;
if(x > 100)x = 100;
}
x = -100;
tekdino wrote:The scroller doesn't go to to the bar.
And it can't move to right. It still moves to left only with negative numbers.
It still starts with 0 instead of 100.
if(change == 0 && x < 100)change = 1;
if(change == 1) {
y = palkki.y + height / 2;
population = (x + 100) / 4;
if(x < -100)x = -100;
if(x > 100)x = 100;
}
if(population < 0)population = 0;
if(population > 50)population = 50;
Users browsing this forum: No registered users and 1 guest