Changing GUI sprites

Started by Glenjamin, Sat 21/03/2015 18:56:09

Previous topic - Next topic

Glenjamin

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?

HandsFree

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?

Glenjamin

I'm using the 9 verb template.

monkey0506

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.

Monsieur OUXX

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

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

It should take two seconds using the search function.
 

SMF spam blocked by CleanTalk