Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: theswitch on Thu 20/07/2006 21:55:58

Title: animated loading bar that grows, yes me newb
Post by: theswitch on Thu 20/07/2006 21:55:58
yes this is an easy one, I'm sorry to take up your time with this question, but atleast I added that little bit onto the end of the thread name ;)

anyhow, first you should know this loading bar will not be for loading up an ags game or area as I belive it doesn't need one

but

I want one anyway ;D

sooo ofcourse I just read that similar thread about makeing a bar reflect an int value and the one reply about useing a button size to create a dynamic bar wich was from Mr Pablo (Mr I think?)

sooo

I would use repeaditly exicute (spelling :-[) to make this happen I presume, the bar would appear and start loading (imaginary data ofcourse) from a click on a seperate gui button

the real reason why I'm asking this in the forums is because I was working steady on a project and then left it for oh. . . 5 months or so, so I have to get up to speed agien :-[ EDIT: wich would be my first AGS project

Title: Re: animated loading bar that grows, yes me newb
Post by: on Fri 21/07/2006 09:27:52
Maybe you could make an animating object? That, I think, is easier.
Title: Re: animated loading bar that grows, yes me newb
Post by: monkey0506 on Sat 22/07/2006 05:30:05
You could use Button.Width (http://www.adventuregamestudio.co.uk/manual/GUIControl.Width.htm) and Button.ClipImage (http://www.adventuregamestudio.co.uk/manual/Button.ClipImage.htm).

Just make sure that Button.ClipImage is true and set the width with some sort of loop:

int i = 0;
while (i < 50) { // wait half a second, then update the bar image by 2%
  btnBar.Width = (i * 2);
  i++;
  Wait(20);
  }


You would, of course, set the Button's image to that of the full bar in the editor.
Title: Re: animated loading bar that grows, yes me newb
Post by: theswitch on Sat 22/07/2006 22:45:33
 :D

thanks, that should do the trick :)