GUI Button Graphic Changes Don't "Stick" When Loading Saved Game

Started by MaeveGlaistig, Fri 26/02/2021 01:38:54

Previous topic - Next topic

MaeveGlaistig

Okay, so I have a GUI that uses buttons to display a sort of "checklist" when the player succeeds at things. The buttons have an initial graphic that is just a transparent bar, and when the player succeeds at something, that action includes a little snippet to change the button's graphic to show it as done, like so:

Code: ags
if (cCharacter.ActiveInventory == iKey)
{  bBlessing.NormalGraphic = 411;  }


Where 411 is the sprite number of the correct new graphic. This works just fine! The weird part comes in when the game is saved and then restored from a saved game. Suddenly, the buttons have reverted to their previous transparent appearance... or so it seems. Actually, when they're moused over, the correct graphic populates, which makes it seem like something is preventing the saved game from remembering the button's new graphic until it is somehow interacted with. (For the record, these buttons aren't clickable - they don't do anything but display the graphic.)

What am I missing here? Is it something about changing the button's NormalGraphic property vs. something else I should be using instead?

eri0o

Can you tell which AGS version are you using exactly? It's usually in the about menu and has the format of something like 3.5.0.XX

Crimson Wizard

Similar question was asked several hours ago: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58881.0

If you have same problem it's best to merge discussions in one thread.

MaeveGlaistig

Quote from: eri0oCan you tell which AGS version are you using exactly? It's usually in the about menu and has the format of something like 3.5.0.XX

3.5.0.25 (July 2020)!

Quote from: Crimson WizardSimilar question was asked several hours ago: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58881.0

If you have same problem it's best to merge discussions in one thread.

WELP, that's what I get for doing all my forum and manual searching yesterday and only posting the thread today. It does look like the same problem. Information added over there to that thread!

SMF spam blocked by CleanTalk