Thread: MAKI Cheats
View Single Post
Old 26th March 2003, 09:14   #368
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
ok
this is my first try at scripting so its prolly not n e good. i was trying to compile this file to maki but i can't get it to work. n e help? script is below and i will attach the .m

code:
//----------------------------------------------------------------------------------------------------------------
// My crumby attemp at display changing
//----------------------------------------------------------------------------------------------------------------
#include "../../../lib/std.mi"

Function CycleDisplayModeInstant();

Global Group Grp1, Grp2, Grp3;
Global Button ChngLytGrp;

Global Int DisplayMode; //0=EQ, 1=TH, 2=VIS, 3=VT
Global Int SlideMode; //0=Instant, 1=Slide

System.onScriptLoaded() {
Group pcGroup = getContainer("main").getLayout("Orb").findObject("Layout Groups");

Grp1 = pcGroup.findObject("C-Buttons");
Grp2 = pcGroup.findObject("Play Button");
Grp3 = pcGroup.findObject("Custom Vis");
ChngLytGrp = pcGroup.findObject("layout.change");
}

CycleDisplayModeSlide() { //eq th vis
if (DisplayMode == 0) {
Grp1.show();
Grp1.setXMLParam("y","-50");
Grp1.setTargetY(3);
Grp1.setTargetSpeed(0.75);
Grp2.setTargetY(55);
Grp2.setTargetSpeed(0.75);
Grp1.gotoTarget();
Grp2.gotoTarget();
DisplayMode = 1;
} else if (DisplayMode == 1) {
Grp3.show();
Grp3.setXMLParam("y","-50");
Grp3.setTargetY(3);
Grp3.setTargetSpeed(0.75);
Grp1.setTargetY(55);
Grp1.setTargetSpeed(0.75);
Grp3.gotoTarget();
Grp1.gotoTarget();
DisplayMode = 2;
} else {
Grp2.show();
Grp2.setXMLParam("y","-50");
Grp2.setTargetY(3);
Grp2.setTargetSpeed(0.75);
Grp2.gotoTarget();
DisplayMode = 0;
}
}

Grp2.onTargetReached() {
if (DisplayMode != 0) {
Grp2.hide();
Grp2.setXMLParam("y","3");
}
}

Grp1.onTargetReached() {
if (DisplayMode != 1) {
Grp1.hide();
Grp1.setXMLParam("y","3");
}
}

Grp3.onTargetReached() {
if (DisplayMode != 2) {
Grp3.hide();
Grp3.setXMLParam("y","3");
}
}



ChngLytGrp.onLeftButtonUp(int x, int y) {
if (InstantMode) {
CycleDisplayModeInstant();
}
}

Attached Files
File Type: m layout.m (1.9 KB, 1078 views)

matt_69 is offline   Reply With Quote