Troubleshooting

How to use Switches to change the bitmap of a CustomButton

Started by Jeshua on .

Sign in or create an account to join the conversation.

9 posts

Topic starter
I have 4x2 switch object that I want to use to change a CustomButton's bitmap offstate to four different symbols according to which switch is on.

How would I make this script?

Thank you :)
Subject: Re: How to use Switches to change the bitmap of a CustomButt
you call up the 'bitmap' attribute of the CustomButton. Something like this:
decl i=firstof(Switches.x);

setattribute(CustomButton, 'bitmap', i);
Thanks for the idea, I wasn't aware of this bitmap attribute.

Ups, Softcore was faster. :D
Subject: Re: How to use Switches to change the bitmap of a CustomButt
Hi
getattributelist(object) is a handy one to just chuck in a monitor to check whats possible whilst coding . .
Or print out the appendix bits from the guide as well . . .
I keep meaning to post my attribute lister thing . . .
MM
Subject: Re: How to use Switches to change the bitmap of a CustomButt
Macciza wrote:Hi
getattributelist(object) is a handy one to just chuck in a monitor to check whats possible whilst coding . .
I wasn't aware of that one either.

Cool stuff, thanks!