GML Save page and color in 1 variable

XenonMax

Member
Hello,
I want to program something like a Launchpad light show painter(this thing with buttons/music/light).
Now I try to save the current buttoncolor in a variable on the right page!
Like --> ( If I have page 2 change color(or image_index) to red(or 2) )
(I can't create 100000 variables for each page)

I tryed:

- Button[global.page]=global.color
- (global.page)Button=global.color

Unbenannt.PNG
 

TheouAegis

Member
You multiply the larger value by the max possible value of the smaller value. For example, if you have two values a&b, and a can be anywhere between 0 and 2000, and b can be anywhere between 0 and 9, you would multiply a by 10 and add it to b.

So if a is 9999 and b is 4, the value you would save is 99994.
 
Top