Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Armageddon on Mon 20/06/2011 03:12:40

Title: GUI Question
Post by: Armageddon on Mon 20/06/2011 03:12:40
Hello. I've made a simple GUI for my game set it all up and it works fine.

(http://dl.dropbox.com/u/5479044/FIlm_GUI01.png)

As you may be able to see it's a film strip. I really wanted it so that when you walk it overlays other images over this, just while you walk, so it looks like it's moving. I've already imported them. I'm thinking I somehow enable and disable a timer while he's walking or something?
Title: Re: GUI Question
Post by: Khris on Mon 20/06/2011 08:56:32
I would use a second, non-clickable GUI with a higher z-Order that's transparent except for two buttons at the top and bottom.
Those buttons animate continously, displaying the images of the moving holes.

All that's left to do is turn the GUI visible during animations or just walking.

void repeatedly_execute_always() {
  if ((!IsInterfaceEnabled() || player.Moving) && !gHoles.Visible) gHoles.Visible = true;
  if (IsInterfaceEnabled() && !player.Moving && gHoles.Visible) gHoles.Visible = false;
}
Title: Re: GUI Question
Post by: Armageddon on Tue 21/06/2011 00:02:56
Awesome I'll give it a try. Thanks.
Title: Re: GUI Question
Post by: Armageddon on Tue 21/06/2011 01:42:56
So I'm having a small problem, my GUI image takes over the entire screen, and I've set up all the buttons and things. The problem is that the player can't walk or anything , I thought that you could click through transparent images. I only wanted it to react to the buttons. ???
Title: Re: GUI Question
Post by: Khris on Tue 21/06/2011 08:10:08
Yeah, the GUI has to be clickable and thus will catch mouse clicks regardless of the background color. You have to split it up.