Kiran Müller
Commander Keen
Hey, ich bins nochmal, ich habe mit einer meiner Maschienen probleme ;-)
Und habe ich ein Lager mit Automatischer Ein- und Auslagerung gebaut! Funktioniert soweit auch ;-)
Allerdings bevor er eine Kiste auslagert, fährt er aktuell an die Anfangsposition zurück, weil ich alles per x und z move gemacht habe!
Damit ich einfach mitten in den Regalen zur Auslagerung fahren kann, wollte ich das mit moveTo(); machen! Allerdings weiß ich noch net so genau, wie das läuft! Also ich habe noDraw-Cubes zu func_static gemacht, diese benannt und mit den Punkten genau an die Stelle gebracht, wo der Punkt vom func_mover landen soll! Das ganze sieht so aus:
Das Spiel startet auch soweit, aber das Teil bewegt sich jetzt keinen Zentimeter....
Weiß da einer, wo der Fehler ist ;-)
Und ja ;-) das ist im void main() drin ;-)
EDIT: Also bewegen tut er jetzt schon mal ;-) Allerdings bleibt der lift stehen, mit der Fehlermeldung Entity not found for moveTo()! Der existiert aber... Der raiser macht keine Mucken!
Allerdings ist mir jetzt aufgefallen, dass der aus dem Lift rausfährt ;-( Kann man den moveTo() auf eine Achse begrenzen?
So, ich habe jetzt mir die Arbeit gemacht dass ganze per Hand einzutippen mit move:
Jetzt bekomm ich aber die ganze Zeit "type mismatch for '=='":
Die Zeile:
Weiß da einer was da dran falsch ist?
Und habe ich ein Lager mit Automatischer Ein- und Auslagerung gebaut! Funktioniert soweit auch ;-)
Allerdings bevor er eine Kiste auslagert, fährt er aktuell an die Anfangsposition zurück, weil ich alles per x und z move gemacht habe!
Damit ich einfach mitten in den Regalen zur Auslagerung fahren kann, wollte ich das mit moveTo(); machen! Allerdings weiß ich noch net so genau, wie das läuft! Also ich habe noDraw-Cubes zu func_static gemacht, diese benannt und mit den Punkten genau an die Stelle gebracht, wo der Punkt vom func_mover landen soll! Das ganze sieht so aus:
PHP:
void alpha_machine1_move(float slot) {
entity lift=$alpha_machine1_lift;
entity raiser=$alpha_machine1_raiser;
entity lift_slot=sys.getEntity("alpha_machine1_lift_slot_" +slot);
entity raiser_slot=sys.getEntity("alpha_machine1_raiser_slot_" +slot);
raiser.moveTo(raiser_slot);
lift.moveTo(lift_slot);
sys.waitFor(lift);
sys.waitFor(raiser);
}
void alpha_machine1() {
setup_alpha_machine1();
while(1) {
//alpha_machine1_store(1, 0);
//alpha_machine1_send(1, 0);
alpha_machine1_move(7);
alpha_machine1_move(0);
alpha_machine1_move(15);
alpha_machine1_move(2);
alpha_machine1_move(16);
alpha_machine1_move(7);
alpha_machine1_move(3);
alpha_machine1_move(14);
}
}
Weiß da einer, wo der Fehler ist ;-)
Und ja ;-) das ist im void main() drin ;-)
EDIT: Also bewegen tut er jetzt schon mal ;-) Allerdings bleibt der lift stehen, mit der Fehlermeldung Entity not found for moveTo()! Der existiert aber... Der raiser macht keine Mucken!
Allerdings ist mir jetzt aufgefallen, dass der aus dem Lift rausfährt ;-( Kann man den moveTo() auf eine Achse begrenzen?
So, ich habe jetzt mir die Arbeit gemacht dass ganze per Hand einzutippen mit move:
PHP:
// Wert start_slot wird in Lift gespeichert
void alpha_machine1_move(float target_slot) {
float slot = target_slot;
float x;
float x2;
float x3;
float x_dir;
float z;
float z2;
float z3;
float z_dir;
if($alpha_machine1_lift.getKey("start_slot") == "0") {
if(slot == "1") {x2=4*88; x3=270; z2=96*2; z3=UP;}
if(slot == "2") {x2=3*88; x3=270; z2=96*2; z3=UP;}
if(slot == "3") {x2=2*88; x3=270; z2=96*2; z3=UP;}
if(slot == "4") {x2=1*88; x3=270; z2=96*2; z3=UP;}
if(slot == "5") {x2=0; x3=270; z2=96*2; z3=UP;}
if(slot == "6") {x2=4*88; x3=270; z2=96*1; z3=UP;}
if(slot == "7") {x2=3*88; x3=270; z2=96*1; z3=UP;}
if(slot == "8") {x2=2*88; x3=270; z2=96*1; z3=UP;}
if(slot == "9") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "10") {x2=0; x3=270; z2=96*1; z3=UP;}
if(slot == "11") {x2=4*88; x3=270; z2=0; z3=UP;}
if(slot == "12") {x2=3*88; x3=270; z2=0; z3=UP;}
if(slot == "13") {x2=2*88; x3=270; z2=0; z3=UP;}
if(slot == "14") {x2=1*88; x3=270; z2=0; z3=UP;}
if(slot == "15") {x2=0; x3=270; z2=0; z3=UP;}
if(slot == "16") {x2=(4*88)+32; x3=270; z2=96*2; z3=UP;}
x = x2+128;
x_dir = x3;
z = z2+72;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "1") {
if(slot == "0") {x2=(4*88)+128; x3=90; z2=(96*2)+72; z3=DOWN;}
if(slot == "2") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "3") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "4") {x2=3*88; x3=90; z2=0; z3=DOWN;}
if(slot == "5") {x2=4*88; x3=90; z2=0; z3=DOWN;}
if(slot == "6") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "7") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "8") {x2=2*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "9") {x2=3*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "10") {x2=4*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "11") {x2=0; x3=90; z2=96*2; z3=DOWN;}
if(slot == "12") {x2=1*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "13") {x2=2*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "14") {x2=3*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "15") {x2=4*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "16") {x2=32; x3=270; z2=0; z3=DOWN;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "2") {
if(slot == "0") {x2=(3*88)+128; x3=90; z2=(96*2)+72; z3=DOWN;}
if(slot == "1") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "3") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "4") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "5") {x2=3*88; x3=90; z2=0; z3=DOWN;}
if(slot == "6") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "7") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "8") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "9") {x2=2*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "10") {x2=3*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "11") {x2=1*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "12") {x2=0; x3=90; z2=96*2; z3=DOWN;}
if(slot == "13") {x2=1*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "14") {x2=2*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "15") {x2=3*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "16") {x2=(1*88)+32; x3=270; z2=0; z3=DOWN;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "3") {
if(slot == "0") {x2=(2*88)+128; x3=90; z2=(96*2)+72; z3=DOWN;}
if(slot == "1") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "2") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "4") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "5") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "6") {x2=2*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "7") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "8") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "9") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "10") {x2=2*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "11") {x2=2*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "12") {x2=1*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "13") {x2=0; x3=90; z2=96*2; z3=DOWN;}
if(slot == "14") {x2=1*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "15") {x2=2*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "16") {x2=(2*88)+32; x3=270; z2=0; z3=DOWN;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "4") {
if(slot == "0") {x2=(1*88)+128; x3=90; z2=(96*2)+72; z3=DOWN;}
if(slot == "1") {x2=3*88; x3=270; z2=0; z3=DOWN;}
if(slot == "2") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "3") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "5") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "6") {x2=3*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "7") {x2=2*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "8") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "9") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "10") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "11") {x2=3*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "12") {x2=2*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "13") {x2=1*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "14") {x2=0; x3=90; z2=96*2; z3=DOWN;}
if(slot == "15") {x2=1*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "16") {x2=(3*88)+32; x3=270; z2=0; z3=DOWN;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "5") {
if(slot == "0") {x2=128; x3=90; z2=(96*2)+72; z3=DOWN;}
if(slot == "1") {x2=4*88; x3=270; z2=0; z3=DOWN;}
if(slot == "2") {x2=30; x3=270; z2=0; z3=DOWN;}
if(slot == "3") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "4") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "6") {x2=4*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "7") {x2=3*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "8") {x2=2*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "9") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "10") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "11") {x2=4*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "12") {x2=3*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "13") {x2=2*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "14") {x2=1*88; x3=270; z2=96*2; z3=DOWN;}
if(slot == "15") {x2=0; x3=90; z2=96*2; z3=DOWN;}
if(slot == "16") {x2=(4*88)+32; x3=270; z2=0; z3=DOWN;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "6") {
if(slot == "0") {x2=(4*88)+128; x3=90; z2=(96x1)+72; z3=DOWN;}
if(slot == "1") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "2") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "3") {x2=2*88; x3=90; z2=96*1; z3=UP;}
if(slot == "4") {x2=3*88; x3=90; z2=96*1; z3=UP;}
if(slot == "5") {x2=4*88; x3=90; z2=96*1; z3=UP;}
if(slot == "7") {x2=1*88; x3=90; z2=0; z3=UP;}
if(slot == "8") {x2=2*88; x3=90; z2=0; z3=UP;}
if(slot == "9") {x2=3*88; x3=90; z2=0; z3=UP;}
if(slot == "10") {x2=4*88; x3=90; z2=0; z3=UP;}
if(slot == "11") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "12") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "13") {x2=2*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "14") {x2=3*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "15") {x2=4*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "16") {x2=32; x3=270; z2=96*1; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "7") {
if(slot == "0") {x2=(3*88)+128; x3=90; z2=(96*2)+72; z3=DOWN;}
if(slot == "1") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "2") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "3") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "4") {x2=2*88; x3=90; z2=96*1; z3=UP;}
if(slot == "5") {x2=3*88; x3=90; z2=96*1; z3=UP;}
if(slot == "6") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "8") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "9") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "10") {x2=3*88; x3=90; z2=0; z3=DOWN;}
if(slot == "11") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "12") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "13") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "14") {x2=2*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "15") {x2=3*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "16") {x2=(1*88)+32; x3=270; z2=96*1; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "8") {
if(slot == "0") {x2=(2*88)+128; x3=90; z2=(96x1)+72; z3=DOWN;}
if(slot == "1") {x2=2*88; x3=270; z2=96*1; z3=UP;}
if(slot == "2") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "3") {x2=0; x3=90; z2=96x1 z3=UP;}
if(slot == "4") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "5") {x2=2*88; x3=90; z2=96*1; z3=UP;}
if(slot == "6") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "7") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "9") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "10") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "11") {x2=2*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "12") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "13") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "14") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "15") {x2=2*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "16") {x2=(2*88)+32; x3=270; z2=96*1; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "9") {
if(slot == "0") {x2=(1*88)+128; x3=90; z2=(96x1)+72; z3=DOWN;}
if(slot == "1") {x2=3*88; x3=270; z2=96*1; z3=UP;}
if(slot == "2") {x2=2*88; x3=270; z2=96*1; z3=UP;}
if(slot == "3") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "4") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "5") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "6") {x2=3*88; x3=270; z2=0; z3=DOWN;}
if(slot == "7") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "8") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "10") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "11") {x2=3*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "12") {x2=2*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "13") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "14") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "15") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "16") {x2=(3*88)+32; x3=270; z2=96*1; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "10") {
if(slot == "0") {x2=128; x3=90; z2=(96x1)+72; z3=DOWN;}
if(slot == "1") {x2=4*88; x3=270; z2=96*1; z3=UP;}
if(slot == "2") {x2=30; x3=270; z2=96*1; z3=UP;}
if(slot == "3") {x2=2*88; x3=270; z2=96*1; z3=UP;}
if(slot == "4") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "5") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "6") {x2=4*88; x3=270; z2=0; z3=DOWN;}
if(slot == "7") {x2=3*88; x3=270; z2=0; z3=DOWN;}
if(slot == "8") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "9") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "11") {x2=4*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "12") {x2=3*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "13") {x2=2*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "14") {x2=1*88; x3=270; z2=96*1; z3=DOWN;}
if(slot == "15") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "16") {x2=(4*88)+32; x3=270; z2=96*1; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "11") {
if(slot == "0") {x2=(4*88)+128; x3=90; z2=72; z3=DOWN;}
if(slot == "1") {x2=0; x3=90; z2=96*2; z3=UP;}
if(slot == "2") {x2=1*88; x3=90; z2=96*2; z3=UP;}
if(slot == "3") {x2=2*88; x3=90; z2=96*2; z3=UP;}
if(slot == "4") {x2=3*88; x3=90; z2=96*2; z3=UP;}
if(slot == "5") {x2=4*88; x3=90; z2=96*2; z3=UP;}
if(slot == "6") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "7") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "8") {x2=2*88; x3=90; z2=96*1; z3=UP;}
if(slot == "9") {x2=3*88; x3=90; z2=96*1; z3=UP;}
if(slot == "10") {x2=4*88; x3=90; z2=96*1; z3=UP;}
if(slot == "12") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "13") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "14") {x2=3*88; x3=90; z2=0; z3=DOWN;}
if(slot == "15") {x2=4*88; x3=90; z2=0; z3=DOWN;}
if(slot == "16") {x2=32; x3=270; z2=0; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "12") {
if(slot == "0") {x2=(3*88)+128; x3=90; z2=72; z3=DOWN;}
if(slot == "1") {x2=1*88; x3=270; z2=96*2; z3=UP;}
if(slot == "2") {x2=0; x3=90; z2=96*2; z3=UP;}
if(slot == "3") {x2=1*88; x3=90; z2=96*2; z3=UP;}
if(slot == "4") {x2=2*88; x3=90; z2=96*2; z3=UP;}
if(slot == "5") {x2=3*88; x3=90; z2=96*2; z3=UP;}
if(slot == "6") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "7") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "8") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "9") {x2=2*88; x3=90; z2=96*1; z3=UP;}
if(slot == "10") {x2=3*88; x3=90; z2=96*1; z3=UP;}
if(slot == "11") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "13") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "14") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "15") {x2=3*88; x3=90; z2=0; z3=DOWN;}
if(slot == "16") {x2=(1*88)+32; x3=270; z2=0; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "13") {
if(slot == "0") {x2=(2*88)+128; x3=90; z2=72; z3=DOWN;}
if(slot == "1") {x2=2*88; x3=270; z2=96*2; z3=UP;}
if(slot == "2") {x2=1*88; x3=270; z2=96*2; z3=UP;}
if(slot == "3") {x2=0; x3=90; z2=96*2; z3=UP;}
if(slot == "4") {x2=1*88; x3=90; z2=96*2; z3=UP;}
if(slot == "5") {x2=2*88; x3=90; z2=96*2; z3=UP;}
if(slot == "6") {x2=2*88; x3=270; z2=96*1; z3=UP;}
if(slot == "7") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "8") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "9") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "10") {x2=2*88; x3=90; z2=96*1; z3=UP;}
if(slot == "11") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "12") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "14") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "15") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "16") {x2=(2*88)+32; x3=270; z2=0; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "14") {
if(slot == "0") {x2=(1*88)+128; x3=90; z2=72; z3=DOWN;}
if(slot == "1") {x2=3*88; x3=270; z2=96*2; z3=UP;}
if(slot == "2") {x2=2*88; x3=270; z2=96*2; z3=UP;}
if(slot == "3") {x2=1*88; x3=270; z2=96*2; z3=UP;}
if(slot == "4") {x2=0; x3=90; z2=96*2; z3=UP;}
if(slot == "5") {x2=1*88; x3=90; z2=96*2; z3=UP;}
if(slot == "6") {x2=3*88; x3=270; z2=96*1; z3=UP;}
if(slot == "7") {x2=2*88; x3=270; z2=96*1; z3=UP;}
if(slot == "8") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "9") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "10") {x2=1*88; x3=90; z2=96*1; z3=UP;}
if(slot == "11") {x2=3*88; x3=270; z2=0; z3=DOWN;}
if(slot == "12") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "13") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "15") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "16") {x2=(3*88)+32; x3=270; z2=0; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "15") {
if(slot == "0") {x2=128; x3=90; z2=72; z3=DOWN;}
if(slot == "1") {x2=4*88; x3=270; z2=96*2; z3=UP;}
if(slot == "2") {x2=30; x3=270; z2=96*2; z3=UP;}
if(slot == "3") {x2=2*88; x3=270; z2=96*2; z3=UP;}
if(slot == "4") {x2=1*88; x3=270; z2=96*2; z3=UP;}
if(slot == "5") {x2=0; x3=90; z2=96*2; z3=UP;}
if(slot == "6") {x2=4*88; x3=270; z2=96*1; z3=UP;}
if(slot == "7") {x2=3*88; x3=270; z2=96*1; z3=UP;}
if(slot == "8") {x2=2*88; x3=270; z2=96*1; z3=UP;}
if(slot == "9") {x2=1*88; x3=270; z2=96*1; z3=UP;}
if(slot == "10") {x2=0; x3=90; z2=96*1; z3=UP;}
if(slot == "11") {x2=4*88; x3=270; z2=0; z3=DOWN;}
if(slot == "12") {x2=3*88; x3=270; z2=0; z3=DOWN;}
if(slot == "13") {x2=2*88; x3=270; z2=0; z3=DOWN;}
if(slot == "14") {x2=1*88; x3=270; z2=0; z3=DOWN;}
if(slot == "16") {x2=(4*88)+32; x3=270; z2=0; z3=UP;}
x = x2;
x_dir = x3;
z = z2;
z_dir = z3;
}
if($alpha_machine1_lift.getKey("start_slot") == "16") {
if(slot == "0") {x2=(4*88)+128; x3=90; z2=(96*2)+72; z3=DOWN;}
if(slot == "1") {x2=0; x3=270; z2=0; z3=DOWN;}
if(slot == "2") {x2=1*88; x3=90; z2=0; z3=DOWN;}
if(slot == "3") {x2=2*88; x3=90; z2=0; z3=DOWN;}
if(slot == "4") {x2=3*88; x3=90; z2=0; z3=DOWN;}
if(slot == "5") {x2=4*88; x3=90; z2=0; z3=DOWN;}
if(slot == "6") {x2=0; x3=90; z2=96*1; z3=DOWN;}
if(slot == "7") {x2=1*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "8") {x2=2*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "9") {x2=3*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "10") {x2=4*88; x3=90; z2=96*1; z3=DOWN;}
if(slot == "11") {x2=0; x3=90; z2=96*2; z3=DOWN;}
if(slot == "12") {x2=1*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "13") {x2=2*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "14") {x2=3*88; x3=90; z2=96*2; z3=DOWN;}
if(slot == "15") {x2=4*88; x3=90; z2=96*2; z3=DOWN;}
x = x2+32;
x_dir = x3;
z = z2;
z_dir = z3;
}
$alpha_machine1_left.setKey("start_slot", slot);
$alpha_machine1_lift.move(x_dir, x);
$alpha_machine1_raiser.move(z_dir, z);
sys.waitFor($alpha_machine1_lift);
sys.waitFor($alpha_machine1_raiser);
}
void alpha_machine1() {
setup_alpha_machine1();
while(1) {
//alpha_machine1_store(1, 0);
//alpha_machine1_send(1, 0);
alpha_machine1_move(7);
alpha_machine1_move(2);
alpha_machine1_move(15);
alpha_machine1_move(2);
alpha_machine1_move(16);
alpha_machine1_move(7);
alpha_machine1_move(3);
alpha_machine1_move(14);
}
}
Jetzt bekomm ich aber die ganze Zeit "type mismatch for '=='":
Die Zeile:
PHP:
if(slot == "1") {x2=4*88; x3=270; z2=96*2; z3=UP;}
Weiß da einer was da dran falsch ist?
Last edited: