Page 1 of 1

Progress bar

Posted: Tue Apr 26, 2016 11:07 am
by MarkoSato
Hello,

I have an old Pokemon fight like battle in my Stack, where I have a progress bar for showing the HP of the enemy.
So the progress bar ist set on 100 at the beginning.
Each attack subtracts 45 from the progress bar. But it does it directly.
I wonder if I can do it like the old Pokemon games, where the bar is slowly going down to 55% or sth. like that, so that there is no instant jump, more like a little animation.

Best
Mark

Re: Progress bar

Posted: Tue Apr 26, 2016 2:09 pm
by dunbarx
Hi.

"sth."

Something? I am getting old.

Have you played with progress bars at all? Make one, set the startValue to 0, the endValue to 100 and the thumb position to 50. Now in a button script:

Code: Select all

on mouseUp
set the thumbpos of scrollbar 1 to (the thumbpos of scrollbar 1) - 5
end mouseUp
You don't even need the parens

Craig Newman