Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Glenjamin on Sat 21/03/2015 18:56:09

Title: Changing GUI sprites
Post by: Glenjamin on Sat 21/03/2015 18:56:09
I'm currently working on GUIs for my game. All I've done so far is change the action button sprites. When the game loads in, the gui buttons have their new sprites for a second but then change back to the defaults. How do I fix this?
Title: Re: Changing GUI sprites
Post by: HandsFree on Sun 22/03/2015 13:00:10
Maybe you can do a search for name-of-your-button.NormalGraphic to see if it gets set anywhere in a script?
Are you using a template?
Title: Re: Changing GUI sprites
Post by: Glenjamin on Sun 22/03/2015 15:25:54
I'm using the 9 verb template.
Title: Re: Changing GUI sprites
Post by: monkey0506 on Mon 23/03/2015 19:05:56
I'm fairly certain that the 9 verb template uses hard-coded sprite values. Not sure if they can be customized, you might check the template's headers (under the "Scripts" branch, look for a header referencing those sprite numbers). I don't have AGS handy ATM or I'd check.
Title: Re: Changing GUI sprites
Post by: Monsieur OUXX on Tue 24/03/2015 09:54:26
Yeah it's totally customizable and (even though I don't have the code in front of my eyes right now) the issue might be that the sprites' Graphics get changed at runtime (maybe in game_load) in order to use the localized sprites.

It's just a matter of changing something like that somewhere, like HandsFree said:
Code (ags) Select

name-of-the-button.NormalGraphic = 666; //assigning the graphic of the "walk to" button

It should take two seconds using the search function.