Button Image Changing

Started by Wiggles_Say, Mon 20/03/2006 11:57:40

Previous topic - Next topic

Wiggles_Say

I'm designing a speech GUI for the top of the screen. I've got a button acting as an avatar for each character, but I can't change the image of the button because it's read-only. Is there anyway around this? Or completely different way of showing an image in a GUI?

Thanks in advance.
"Everyone makes mistakes!" as the Dalek said climbing off the dustbin.

Gilbert

Read-only? Did you mean changing the GUI button image in-game? The Graphic property is read-only because you can have different images for different instances of a button, so instead you need to use the NormalGraphic, MouseOverGraphic and PushedGraphic properties to set the images. Normally you may set NormalGraphic only (if the other Graphic properties were set to -1 the engine will just use NormalGraphic for these instances).

Wiggles_Say

Thanks Gilbot, I've got that working now. Another problem has arisen that I can't access my own functions from the room scripts. How do I get that to work?
"Everyone makes mistakes!" as the Dalek said climbing off the dustbin.

Ashen

BFAQ: Creating your own functions (you want the middle bit).

You need to import it into the Script Header (Ctrl-H) with the import command. You'd do the same for any ints you've created, except that they have to be exported from the Global Script first, using export.

Look up import and export in the manual for more details
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk