Sorry for the confusing title!
I'm currently making a program in which you need to take care of a Quokka and every second his/hers needs will drop and right now it goes down with 1 per second but it needs to be 1.5% per tick, i tried to simply make it from INT to LONG but then my status bars stop working.
Status bar
The code above draws a bar which slowly decays every time.
The code that gets executed every second, decreasing the conditions
So as you can see it just decreases it with 1, pretty simple but it needs to be 1.5% which i wanted to do with simply putting in that it should take off 1.5 per tick but then the code i posted before (with the bars) stop working.
Can anyone help me?
public void toonConditions(QuokkaModel qm)
{
GreenfootImage bg = getBackground();
bg.setColor(Color.blue);
bg.drawRect(8, 2, 8, 102);
bg.fillRect(10,4,5,1*qm.getHealth());
public void live()
{
health--;
tiredness++;
happiness--;
hunger++;
}

