Frame 3
ifFrameLoaded (376) {
gotoAndPlay (5);
}
Frame 4
gotoAndPlay (3);
Frame 10
car2play = false;
tellTarget ("_root.check2") {
gotoAndStop (2);
};
compplay = false;
tellTarget ("_root.check3") {
gotoAndStop (2);
};
damage = false;
tellTarget ("_root.check4") {
gotoAndStop (2);
};
car1play = true;
Frame 11
stop();
Frame 25
laps = 9;
stop();
Frame 62
setProperty("_root.stat_car1speed.bar2", _width , 1);
stat_car1speed = 0;
setProperty("_root.stat_car1health.bar2", _width , 1);
stat_car1health = 100;
setProperty("_root.stat_car2speed.bar2", _width , 1);
stat_car2speed = 0;
setProperty("_root.stat_car2health.bar2", _width , 1);
stat_car2health = 100;
stat_comphealth = 50;
timer = 0;
if (car1play == false) {
setProperty("_root.car", _visible , false);
car1dead = 1;
setProperty("_root.car", _x , "-100");
}
if (car2play == false) {
setProperty("_root.car2", _visible , false);
car2dead = 1;
setProperty("_root.car2", _x , "-200");
}
if (compplay == false) {
setProperty("_root.comp1path", _visible , false);
compdead = 1;
setProperty("_root.comp1path", _x , "-1000");
setProperty("_root.comp1path", _y , "-1000");
}
if (damage == false) {
setProperty("_root.stat_car1health", _visible , false);
setProperty("_root.stat_car2health", _visible , false);
}
Frame 147
gamespeed = 5;
setProperty("/carspeed/hairline", _yscale , 1);
setProperty("/carspeed/hairline", _visible , false);
setProperty("/carspeed/hairline", _yscale , Number(getProperty("/carspeed/hairline", _height)) + 30);
hairline = 5;
setProperty("/carspeed2/hairline", _yscale , 1);
setProperty("/carspeed2/hairline", _visible , false);
setProperty("/carspeed2/hairline", _yscale , Number(getProperty("/carspeed2/hairline", _height)) + 30);
hairline2 = 5;
compspeed = 1;
comp1laps1 = 1;
car1laps1 = 0;
car1lapcount = 1;
car2laps1 = 0;
car2lapcount = 1;
car1comp1collision = 0;
car2comp1collision = 0;
car2car1collision = 0;
slowdown = 1;
slowdown2 = 1;
position = 1;
setProperty("_root.checkflag", _visible , false);
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
Frame 148
setProperty("_root.stat_car1speed.bar2", _width , getProperty("/carspeed/hairline", _height) * 10);
stat_car1speed = getProperty("/carspeed/hairline", _height) * 20;
setProperty("_root.stat_car2speed.bar2", _width , getProperty("/carspeed2/hairline", _height) * 10);
stat_car2speed = getProperty("/carspeed2/hairline", _height) * 20;
if (((((0 < ymov) and (100 < stat_car1speed)) and (carx < 135)) and (290 < cary)) and (vroom != 1)) {
tellTarget ("_root.car1sounds") {
gotoAndPlay ("vroom");
};
} else if (135 < carx) {
vroom = 0;
}
if (((((0 < ymov2) and (100 < stat_car2speed)) and (carx2 < 135)) and (290 < cary2)) and (vroom2 != 1)) {
tellTarget ("_root.car2sounds") {
gotoAndPlay ("vroom");
};
} else if (135 < carx2) {
vroom = 0;
}
hairlineheight = getProperty("/carspeed/hairline", _height);
xmov = (getProperty("/carspeed", _width) - 1) / slowdown;
ymov = (getProperty("/carspeed", _height) - 1) / slowdown;
carx = getProperty("/car", _x);
cary = getProperty("/car", _y);
car_rotate = getProperty("/car", _rotation);
carspeedx = getProperty("/carspeed", _x);
carspeedy = getProperty("/carspeed", _y);
if (car1dead != 1) {
if (Key.isDown(38)) {
if (Number(hairline) < 54) {
hairline = Number(hairline) + 2;
}
} else if (5 < Number(hairline)) {
hairline = hairline - 2;
}
if (Key.isDown(37)) {
setProperty("/car", _rotation , getProperty("/car", _rotation) - 8);
setProperty("/carspeed", _rotation , getProperty("/carspeed", _rotation) - 8);
}
if (Key.isDown(39)) {
setProperty("/car", _rotation , Number(getProperty("/car", _rotation)) + 8);
setProperty("/carspeed", _rotation , Number(getProperty("/carspeed", _rotation)) + 8);
}
if (Key.isDown(40)) {
if (0.1 < Number(hairline)) {
hairline = hairline - 2;
}
}
if ((90 >= Number(car_rotate)) and (Number(car_rotate) >= Number(-90))) {
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carspeedy - ymov);
} else {
setProperty("/car", _y , Number(cary) + Number(ymov));
setProperty("/carspeed", _y , Number(carspeedy) + Number(ymov));
}
if (Number(car_rotate) < 0) {
setProperty("/car", _x , carx - xmov);
setProperty("/carspeed", _x , carspeedx - xmov);
} else {
setProperty("/car", _x , Number(carx) + Number(xmov));
setProperty("/carspeed", _x , Number(carspeedx) + Number(xmov));
}
if (Number(cary) < 40) {
setProperty("/car", _y , 41);
setProperty("/carspeed", _y , 41);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
} else if (360 < Number(cary)) {
setProperty("/car", _y , 359);
setProperty("/carspeed", _y , 359);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (Number(carx) < 20) {
setProperty("/car", _x , 21);
setProperty("/carspeed", _x , 21);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
} else if (625 < Number(carx)) {
setProperty("/car", _x , 624);
setProperty("/carspeed", _x , 624);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if ((((570 < carx) and (carx < 600)) and (320 < cary)) and (cary < 358)) {
hairline = 0.1;
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carx - xmov);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 1.35);
stat_car1health = stat_car1health - 1;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((142 < carx) and (carx < 490)) and ((145 < cary) and (cary < 165))) {
hairline = 0.1;
setProperty("/car", _y , 144);
setProperty("/carspeed", _y , 144);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((142 < carx) and (carx < 490)) and ((170 < cary) and (cary < 210))) {
hairline = 0.1;
setProperty("/car", _y , 211);
setProperty("/carspeed", _y , 211);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((130 < carx) and (carx < 165)) and ((166 < cary) and (cary < 280))) {
hairline = 0.1;
setProperty("/car", _x , carx - (xmov * 1.5));
setProperty("/carspeed", _x , carx - (xmov * 1.5));
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((490 < carx) and (carx < 500)) and ((166 < cary) and (cary < 209))) {
hairline = 0.1;
setProperty("/car", _x , 501);
setProperty("/carspeed", _x , 501);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if ((275 < carx) and (300 < cary)) {
if (slowdown < 3) {
tellTarget ("_root.car1sounds") {
gotoAndPlay ("gravel");
};
}
slowdown = 3;
} else {
if ((slowdown = 3)) {
tellTarget ("_root.car1sounds") {
gotoAndStop (1);
};
}
slowdown = 1;
}
}
hairlineheight2 = getProperty("/carspeed2/hairline", _height);
xmov2 = (getProperty("/carspeed2", _width) - 1) / slowdown2;
ymov2 = (getProperty("/carspeed2", _height) - 1) / slowdown2;
carx2 = getProperty("/car2", _x);
cary2 = getProperty("/car2", _y);
car_rotate2 = getProperty("/car2", _rotation);
carspeedx2 = getProperty("/carspeed2", _x);
carspeedy2 = getProperty("/carspeed2", _y);
if (car2dead != 1) {
if (Key.isDown(87)) {
if (Number(hairline2) < 54) {
hairline2 = Number(hairline2) + 2;
}
} else if (5 < Number(hairline2)) {
hairline2 = hairline2 - 2;
}
if (Key.isDown(65)) {
setProperty("/car2", _rotation , getProperty("/car2", _rotation) - 8);
setProperty("/carspeed2", _rotation , getProperty("/carspeed2", _rotation) - 8);
}
if (Key.isDown(68)) {
setProperty("/car2", _rotation , Number(getProperty("/car2", _rotation)) + 8);
setProperty("/carspeed2", _rotation , Number(getProperty("/carspeed2", _rotation)) + 8);
}
if (Key.isDown(83)) {
if (0.1 < Number(hairline2)) {
hairline2 = hairline2 - 2;
}
}
if ((90 >= Number(car_rotate2)) and (Number(car_rotate2) >= Number(-90))) {
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carspeedy2 - ymov2);
} else {
setProperty("/car2", _y , Number(cary2) + Number(ymov2));
setProperty("/carspeed2", _y , Number(carspeedy2) + Number(ymov2));
}
if (Number(car_rotate2) < 0) {
setProperty("/car2", _x , carx2 - xmov2);
setProperty("/carspeed2", _x , carspeedx2 - xmov2);
} else {
setProperty("/car2", _x , Number(carx2) + Number(xmov2));
setProperty("/carspeed2", _x , Number(carspeedx2) + Number(xmov2));
}
if (Number(cary2) < 40) {
setProperty("/car2", _y , 41);
setProperty("/carspeed2", _y , 41);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
} else if (360 < Number(cary2)) {
setProperty("/car2", _y , 359);
setProperty("/carspeed2", _y , 359);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (Number(carx2) < 30) {
setProperty("/car2", _x , 31);
setProperty("/carspeed2", _x , 31);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
} else if (625 < Number(carx2)) {
setProperty("/car2", _x , 624);
setProperty("/carspeed2", _x , 624);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if ((((570 < carx2) and (carx2 < 600)) and (320 < cary2)) and (cary2 < 358)) {
hairline2 = 0.1;
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carx2 - xmov2);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 1.35);
stat_car2health = stat_car2health - 1;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((142 < carx2) and (carx2 < 490)) and ((145 < cary2) and (cary2 < 165))) {
hairline2 = 0.1;
setProperty("/car2", _y , 144);
setProperty("/carspeed2", _y , 144);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((142 < carx2) and (carx2 < 490)) and ((170 < cary2) and (cary2 < 210))) {
hairline2 = 0.1;
setProperty("/car2", _y , 211);
setProperty("/carspeed2", _y , 211);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((130 < carx2) and (carx2 < 165)) and ((166 < cary2) and (cary2 < 280))) {
hairline2 = 0.1;
setProperty("/car2", _x , carx2 - xmov2);
setProperty("/carspeed2", _x , carx2 - xmov2);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((490 < carx2) and (carx2 < 500)) and ((166 < cary2) and (cary2 < 209))) {
hairline2 = 0.1;
setProperty("/car2", _x , 501);
setProperty("/carspeed2", _x , 501);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if ((275 < carx2) and (300 < cary2)) {
if (slowdown2 < 3) {
tellTarget ("_root.car2sounds") {
gotoAndPlay ("gravel");
};
}
slowdown2 = 3;
} else {
if ((slowdown2 = 3)) {
tellTarget ("_root.car2sounds") {
gotoAndStop (1);
};
}
slowdown2 = 1;
}
}
if (compdead != 1) {
loopvar = 0;
while (loopvar < compspeed) {
loopvar = loopvar + 1;
tellTarget ("comp1path") {
nextFrame();
};
}
if (1 >= compspeed) {
compspeed = compspeed + 0.01;
}
}
if ((car1dead != 1) and (compdead != 1)) {
comp1x = getProperty("comp1path.comp1", _x) + getProperty("comp1path", _x);
comp1y = getProperty("comp1path/comp1", _y) + getProperty("comp1path", _y);
car1comp1_diffx = comp1x - carx;
car1comp1_diffy = comp1y - cary;
if (Number(car1comp1_diffx) < 0) {
car1comp1_diffx = car1comp1_diffx * -1;
}
if (Number(car1comp1_diffy) < 0) {
car1comp1_diffy = car1comp1_diffy * -1;
}
car1comp1 = Number(car1comp1_diffx) + Number(car1comp1_diffy);
if (Number(car1comp1) < 30) {
if (car1comp1collision < 1) {
hairline = 0.01;
compspeed = 0;
car1comp1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 13.5);
stat_car1health = stat_car1health - 10;
stat_comphealth = stat_comphealth - 10;
}
} else {
car1comp1collision = 0;
}
}
if ((car2dead != 1) and (compdead != 1)) {
comp1x = getProperty("comp1path.comp1", _x) + getProperty("comp1path", _x);
comp1y = getProperty("comp1path/comp1", _y) + getProperty("comp1path", _y);
car2comp1_diffx = comp1x - carx2;
car2comp1_diffy = comp1y - cary2;
if (Number(car2comp1_diffx) < 0) {
car2comp1_diffx = car2comp1_diffx * -1;
}
if (Number(car2comp1_diffy) < 0) {
car2comp1_diffy = car2comp1_diffy * -1;
}
car2comp1 = Number(car2comp1_diffx) + Number(car2comp1_diffy);
if (Number(car2comp1) < 30) {
if (car2comp1collision < 1) {
hairline2 = 0.01;
compspeed = 0;
car2comp1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 13.5);
stat_car2health = stat_car2health - 10;
stat_comphealth = stat_comphealth - 10;
}
} else {
car2comp1collision = 0;
}
}
if ((car1dead != 1) and (car2dead != 1)) {
car2car1_diffx = carx - carx2;
car2car1_diffy = cary - cary2;
if (Number(car2car1_diffx) < 0) {
car2car1_diffx = car2car1_diffx * -1;
}
if (Number(car2car1_diffy) < 0) {
car2car1_diffy = car2car1_diffy * -1;
}
car2car1 = Number(car2car1_diffx) + Number(car2car1_diffy);
if (Number(car2car1) < 30) {
if (car2car1collision < 1) {
hairline2 = 0.01;
hairline = 0.01;
car2car1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 13.5);
stat_car1health = stat_car1health - 10;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 13.5);
stat_car2health = stat_car2health - 10;
}
} else {
car2car1collision = 0;
}
}
if (damage == true) {
if ((0 >= stat_car1health) and (car1dead != 1)) {
car1dead = 1;
tellTarget ("_root.car") {
gotoAndPlay (5);
};
stat_car1health = "";
setProperty("_root.stat_car1health", _alpha , "25");
setProperty("_root.stat_car1speed", _alpha , "25");
}
if ((0 >= stat_car2health) and (car2dead != 1)) {
car2dead = 1;
tellTarget ("_root.car2") {
gotoAndPlay (5);
};
stat_car2health = "";
setProperty("_root.stat_car2health", _alpha , "25");
setProperty("_root.stat_car2speed", _alpha , "25");
}
if ((0 >= stat_comphealth) and (compdead != 1)) {
compdead = 1;
tellTarget ("_root.comp1path.comp1") {
gotoAndPlay (5);
};
stat_comphealth = "";
}
} else {
stat_car2health = 0;
stat_car1health = 0;
}
if ((car1lapcount == 1) and ((490 < carx) and (cary < 175))) {
car1lapcount = 0;
car1laps1 = car1laps1 + 1;
}
if ((carx < 150) and (200 < cary)) {
car1lapcount = 1;
}
if ((car2lapcount == 1) and ((490 < carx2) and (cary2 < 175))) {
car2lapcount = 0;
car2laps1 = car2laps1 + 1;
}
if ((carx2 < 150) and (200 < cary2)) {
car2lapcount = 1;
}
if (laps < car1laps1) {
if (car1dead != 1) {
car1position = position;
position = position + 1;
p1time = timer;
car1dead = 1;
setProperty("_root.car", _alpha , "40");
}
if (0 < hairline) {
hairline = hairline - 3;
if ((90 >= Number(car_rotate)) and (Number(car_rotate) >= Number(-90))) {
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carspeedy - ymov);
} else {
setProperty("/car", _y , Number(cary) + Number(ymov));
setProperty("/carspeed", _y , Number(carspeedy) + Number(ymov));
}
if (Number(car_rotate) < 0) {
setProperty("/car", _x , carx - xmov);
setProperty("/carspeed", _x , carspeedx - xmov);
} else {
setProperty("/car", _x , Number(carx) + Number(xmov));
setProperty("/carspeed", _x , Number(carspeedx) + Number(xmov));
}
} else {
hairline = 0;
}
}
if (laps < car2laps1) {
if (car2dead != 1) {
car2position = position;
position = position + 1;
p2time = timer;
car2dead = 1;
setProperty("_root.car2", _alpha , "40");
}
if (0 < hairline2) {
hairline2 = hairline2 - 3;
if ((90 >= Number(car_rotate2)) and (Number(car_rotate2) >= Number(-90))) {
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carspeedy2 - ymov2);
} else {
setProperty("/car2", _y , Number(cary2) + Number(ymov2));
setProperty("/carspeed2", _y , Number(carspeedy2) + Number(ymov2));
}
if (Number(car_rotate2) < 0) {
setProperty("/car2", _x , carx2 - xmov2);
setProperty("/carspeed2", _x , carspeedx2 - xmov2);
} else {
setProperty("/car2", _x , Number(carx2) + Number(xmov2));
setProperty("/carspeed2", _x , Number(carspeedx2) + Number(xmov2));
}
} else {
hairline2 = 0;
}
}
if (laps < comp1laps1) {
if (compdead != 1) {
compposition = position;
position = position + 1;
comptime = timer;
compdead = 1;
setProperty("_root.comp1path", _alpha , "40");
}
if (0 < comspeed) {
compspeed = compspeed - 0.1;
} else {
compspeed = 0;
}
}
if (((car1laps1 == laps) or (car2laps1 == laps)) or (comp1laps1 == laps)) {
setProperty("_root.checkflag", _visible , true);
}
if ((car1dead == 1) and (car2dead == 1)) {
if (laps < car1laps1) {
car1laps1 = laps;
} else {
p1time = "dnf";
car1position = 5;
}
if (laps < car2laps1) {
car2laps1 = laps;
} else {
p2time = "dnf";
car2position = 5;
}
if (laps < comp1laps1) {
comp1laps1 = laps;
} else {
comptime = "dnf";
compposition = 5;
}
gotoAndPlay (156);
}
Frame 149
gotoAndPlay (148);
Frame 165
stopAllSounds();
gotoAndPlay (438);
Frame 168
setProperty("_root.stat_car1speed.bar2", _width , 1);
stat_car1speed = 0;
setProperty("_root.stat_car1health.bar2", _width , 1);
stat_car1health = 100;
setProperty("_root.stat_car2speed.bar2", _width , 1);
stat_car2speed = 0;
setProperty("_root.stat_car2health.bar2", _width , 1);
stat_car2health = 100;
stat_comphealth = 50;
timer = 0;
if (car1play == false) {
setProperty("_root.car", _visible , false);
car1dead = 1;
setProperty("_root.car", _x , "-100");
}
if (car2play == false) {
setProperty("_root.car2", _visible , false);
car2dead = 1;
setProperty("_root.car2", _x , "-200");
}
if (compplay == false) {
setProperty("_root.comp1path", _visible , false);
compdead = 1;
setProperty("_root.comp1path", _x , "-1000");
setProperty("_root.comp1path", _y , "-1000");
}
if (damage == false) {
setProperty("_root.stat_car1health", _visible , false);
setProperty("_root.stat_car2health", _visible , false);
}
Frame 253
gamespeed = 5;
setProperty("/carspeed/hairline", _yscale , 1);
setProperty("/carspeed/hairline", _visible , false);
setProperty("/carspeed/hairline", _yscale , Number(getProperty("/carspeed/hairline", _height)) + 30);
hairline = 5;
setProperty("/carspeed2/hairline", _yscale , 1);
setProperty("/carspeed2/hairline", _visible , false);
setProperty("/carspeed2/hairline", _yscale , Number(getProperty("/carspeed2/hairline", _height)) + 30);
hairline2 = 5;
compspeed = 1;
comp1laps1 = 1;
car1laps1 = 0;
car1lapcount = 1;
car2laps1 = 0;
car2lapcount = 1;
car1comp1collision = 0;
car2comp1collision = 0;
car2car1collision = 0;
vroom = 1;
vroom2 = 1;
position = 1;
setProperty("_root.checkflag", _visible , false);
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
Frame 254
setProperty("_root.stat_car1speed.bar2", _width , getProperty("/carspeed/hairline", _height) * 10);
stat_car1speed = getProperty("/carspeed/hairline", _height) * 20;
setProperty("_root.stat_car2speed.bar2", _width , getProperty("/carspeed2/hairline", _height) * 10);
stat_car2speed = getProperty("/carspeed2/hairline", _height) * 20;
hairlineheight = getProperty("/carspeed/hairline", _height);
xmov = (getProperty("/carspeed", _width) - 1) * vroom;
ymov = (getProperty("/carspeed", _height) - 1) * vroom;
carx = getProperty("/car", _x);
cary = getProperty("/car", _y);
car_rotate = getProperty("/car", _rotation);
carspeedx = getProperty("/carspeed", _x);
carspeedy = getProperty("/carspeed", _y);
if (car1dead != 1) {
if (Key.isDown(38)) {
if (Number(hairline) < 54) {
hairline = Number(hairline) + 2;
}
} else if (5 < Number(hairline)) {
hairline = hairline - 2;
}
if (Key.isDown(37)) {
if (((carx < 300) and (95 < carx)) and (cary < 105)) {
setProperty("/car", _rotation , getProperty("/car", _rotation) - 2);
setProperty("/carspeed", _rotation , getProperty("/carspeed", _rotation) - 2);
} else {
setProperty("/car", _rotation , getProperty("/car", _rotation) - 8);
setProperty("/carspeed", _rotation , getProperty("/carspeed", _rotation) - 8);
}
}
if (Key.isDown(39)) {
if (((carx < 300) and (95 < carx)) and (cary < 105)) {
setProperty("/car", _rotation , Number(getProperty("/car", _rotation)) + 2);
setProperty("/carspeed", _rotation , Number(getProperty("/carspeed", _rotation)) + 2);
} else {
setProperty("/car", _rotation , Number(getProperty("/car", _rotation)) + 8);
setProperty("/carspeed", _rotation , Number(getProperty("/carspeed", _rotation)) + 8);
}
}
if (Key.isDown(40)) {
if (0.1 < Number(hairline)) {
hairline = hairline - 2;
}
}
if ((90 >= Number(car_rotate)) and (Number(car_rotate) >= Number(-90))) {
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carspeedy - ymov);
} else {
setProperty("/car", _y , Number(cary) + Number(ymov));
setProperty("/carspeed", _y , Number(carspeedy) + Number(ymov));
}
if (Number(car_rotate) < 0) {
setProperty("/car", _x , carx - xmov);
setProperty("/carspeed", _x , carspeedx - xmov);
} else {
setProperty("/car", _x , Number(carx) + Number(xmov));
setProperty("/carspeed", _x , Number(carspeedx) + Number(xmov));
}
if (Number(cary) < 40) {
setProperty("/car", _y , 41);
setProperty("/carspeed", _y , 41);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
} else if (360 < Number(cary)) {
setProperty("/car", _y , 359);
setProperty("/carspeed", _y , 359);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (Number(carx) < 20) {
setProperty("/car", _x , 21);
setProperty("/carspeed", _x , 21);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
} else if (625 < Number(carx)) {
setProperty("/car", _x , 624);
setProperty("/carspeed", _x , 624);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((570 < carx) and (carx < 600)) and (cary < 50)) {
hairline = 0.1;
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carx - xmov);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 1.35);
stat_car1health = stat_car1health - 1;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((125 < carx) and (carx < 488)) and ((145 < cary) and (cary < 165))) {
hairline = 0.1;
setProperty("/car", _y , 144);
setProperty("/carspeed", _y , 144);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((125 < carx) and (carx < 488)) and ((170 < cary) and (cary < 205))) {
hairline = 0.1;
setProperty("/car", _y , 206);
setProperty("/carspeed", _y , 206);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((125 < carx) and (carx < 250)) and ((250 < cary) and (cary < 280))) {
hairline = 0.1;
setProperty("/car", _y , 281);
setProperty("/carspeed", _y , 281);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((448 < carx) and (carx < 495)) and ((220 < cary) and (cary < 260))) {
hairline = 0.1;
setProperty("/car", _y , 261);
setProperty("/carspeed", _y , 261);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((120 < carx) and (carx < 165)) and ((155 < cary) and (cary < 270))) {
hairline = 0.1;
setProperty("/car", _x , carx - (xmov * 1.5));
setProperty("/carspeed", _x , carx - (xmov * 1.5));
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((455 < carx) and (carx < 470)) and ((200 < cary) and (cary < 245))) {
hairline = 0.1;
setProperty("/car", _x , carx - (xmov * 1.5));
setProperty("/carspeed", _x , carx - (xmov * 1.5));
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((470 < carx) and (carx < 505)) and ((160 < cary) and (cary < 245))) {
hairline = 0.1;
setProperty("/car", _x , 506);
setProperty("/carspeed", _x , 506);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((200 < carx) and (carx < 255)) and ((180 < cary) and (cary < 270))) {
hairline = 0.1;
setProperty("/car", _x , 256);
setProperty("/carspeed", _x , 256);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((330 < carx) and (carx < 410)) and (295 < cary)) {
hairline = 0.1;
if (carx < 375) {
setProperty("/car", _x , carx - (xmov * 1.5));
setProperty("/carspeed", _x , carx - (xmov * 1.5));
setProperty("/car", _y , cary - (ymov * 1.5));
setProperty("/carspeed", _y , cary - (ymov * 1.5));
} else if (375 < carx) {
setProperty("/car", _x , carx + (xmov * 1.5));
setProperty("/carspeed", _x , carx + (xmov * 1.5));
setProperty("/car", _y , cary - (ymov * 1.5));
setProperty("/carspeed", _y , cary - (ymov * 1.5));
} else if (cary < 285) {
setProperty("/car", _y , cary - (ymov * 1.5));
setProperty("/carspeed", _y , cary - (ymov * 1.5));
}
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if ((((400 < carx) and (carx < 475)) and (110 < cary)) and (cary < 140)) {
if (vroom < 3) {
tellTarget ("_root.car1sounds") {
gotoAndStop ("vroom");
};
}
vroom = 3;
} else if (1 < vroom) {
vroom = vroom - 0.1;
if (carx < 140) {
vroom = vroom - 0.5;
}
} else {
vroom = 1;
}
}
hairlineheight2 = getProperty("/carspeed2/hairline", _height);
xmov2 = (getProperty("/carspeed2", _width) - 1) * vroom2;
ymov2 = (getProperty("/carspeed2", _height) - 1) * vroom2;
carx2 = getProperty("/car2", _x);
cary2 = getProperty("/car2", _y);
car_rotate2 = getProperty("/car2", _rotation);
carspeedx2 = getProperty("/carspeed2", _x);
carspeedy2 = getProperty("/carspeed2", _y);
if (car2dead != 1) {
if (Key.isDown(87)) {
if (Number(hairline2) < 54) {
hairline2 = Number(hairline2) + 2;
}
} else if (5 < Number(hairline2)) {
hairline2 = hairline2 - 2;
}
if (Key.isDown(65)) {
if (((carx2 < 300) and (95 < carx2)) and (cary2 < 105)) {
setProperty("/car2", _rotation , getProperty("/car2", _rotation) - 2);
setProperty("/carspeed2", _rotation , getProperty("/carspeed2", _rotation) - 2);
} else {
setProperty("/car2", _rotation , getProperty("/car2", _rotation) - 8);
setProperty("/carspeed2", _rotation , getProperty("/carspeed2", _rotation) - 8);
}
}
if (Key.isDown(68)) {
if (((carx2 < 300) and (95 < carx2)) and (cary2 < 105)) {
setProperty("/car2", _rotation , Number(getProperty("/car2", _rotation)) + 2);
setProperty("/carspeed2", _rotation , Number(getProperty("/carspeed2", _rotation)) + 2);
} else {
setProperty("/car2", _rotation , Number(getProperty("/car2", _rotation)) + 8);
setProperty("/carspeed2", _rotation , Number(getProperty("/carspeed2", _rotation)) + 8);
}
}
if (Key.isDown(83)) {
if (0.1 < Number(hairline2)) {
hairline2 = hairline2 - 2;
}
}
if ((90 >= Number(car_rotate2)) and (Number(car_rotate2) >= Number(-90))) {
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carspeedy2 - ymov2);
} else {
setProperty("/car2", _y , Number(cary2) + Number(ymov2));
setProperty("/carspeed2", _y , Number(carspeedy2) + Number(ymov2));
}
if (Number(car_rotate2) < 0) {
setProperty("/car2", _x , carx2 - xmov2);
setProperty("/carspeed2", _x , carspeedx2 - xmov2);
} else {
setProperty("/car2", _x , Number(carx2) + Number(xmov2));
setProperty("/carspeed2", _x , Number(carspeedx2) + Number(xmov2));
}
if (Number(cary2) < 40) {
setProperty("/car2", _y , 41);
setProperty("/carspeed2", _y , 41);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
} else if (360 < Number(cary2)) {
setProperty("/car2", _y , 359);
setProperty("/carspeed2", _y , 359);
hairline = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (Number(carx2) < 20) {
setProperty("/car2", _x , 21);
setProperty("/carspeed2", _x , 21);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
} else if (625 < Number(carx2)) {
setProperty("/car2", _x , 624);
setProperty("/carspeed2", _x , 624);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((570 < carx2) and (carx2 < 600)) and (cary2 < 50)) {
hairline2 = 0.1;
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carx2 - xmov2);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 1.35);
stat_car2health = stat_car2health - 1;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((125 < carx2) and (carx2 < 488)) and ((145 < cary2) and (cary2 < 165))) {
hairline2 = 0.1;
setProperty("/car2", _y , 144);
setProperty("/carspeed2", _y , 144);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((125 < carx2) and (carx2 < 488)) and ((170 < cary2) and (cary2 < 205))) {
hairline2 = 0.1;
setProperty("/car2", _y , 206);
setProperty("/carspeed2", _y , 206);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((125 < carx2) and (carx2 < 250)) and ((250 < cary2) and (cary2 < 280))) {
hairline2 = 0.1;
setProperty("/car2", _y , 281);
setProperty("/carspeed2", _y , 281);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((448 < carx2) and (carx2 < 495)) and ((220 < cary2) and (cary2 < 260))) {
hairline2 = 0.1;
setProperty("/car2", _y , 261);
setProperty("/carspeed2", _y , 261);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((120 < carx2) and (carx2 < 165)) and ((155 < cary2) and (cary2 < 270))) {
hairline2 = 0.1;
setProperty("/car2", _x , carx2 - (xmov2 * 1.5));
setProperty("/carspeed2", _x , carx2 - (xmov2 * 1.5));
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((455 < carx2) and (carx2 < 470)) and ((200 < cary2) and (cary2 < 245))) {
hairline2 = 0.1;
setProperty("/car2", _x , carx2 - (xmov2 * 1.5));
setProperty("/carspeed2", _x , carx2 - (xmov2 * 1.5));
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((470 < carx2) and (carx2 < 505)) and ((160 < cary2) and (cary2 < 245))) {
hairline2 = 0.1;
setProperty("/car2", _x , 506);
setProperty("/carspeed2", _x , 506);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((200 < carx2) and (carx2 < 255)) and ((180 < cary2) and (cary2 < 270))) {
hairline2 = 0.1;
setProperty("/car2", _x , 256);
setProperty("/carspeed2", _x , 256);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((330 < carx2) and (carx2 < 410)) and (295 < cary2)) {
hairline2 = 0.1;
if (carx2 < 375) {
setProperty("/car2", _x , carx2 - (xmov2 * 1.5));
setProperty("/carspeed2", _x , carx2 - (xmov2 * 1.5));
setProperty("/car2", _y , cary2 - (ymov2 * 1.5));
setProperty("/carspeed2", _y , cary2 - (ymov2 * 1.5));
} else if (375 < carx2) {
setProperty("/car2", _x , carx2 + (xmov2 * 1.5));
setProperty("/carspeed2", _x , carx2 + (xmov2 * 1.5));
setProperty("/car2", _y , cary2 - (ymov2 * 1.5));
setProperty("/carspeed2", _y , cary2 - (ymov2 * 1.5));
} else if (cary2 < 285) {
setProperty("/car2", _y , cary2 - (ymov2 * 1.5));
setProperty("/carspeed2", _y , cary2 - (ymov2 * 1.5));
}
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if ((((400 < carx2) and (carx2 < 475)) and (110 < cary2)) and (cary2 < 140)) {
if (vroom2 < 3) {
tellTarget ("_root.car2sounds") {
gotoAndStop ("vroom");
};
}
vroom2 = 3;
} else if (1 < vroom2) {
vroom2 = vroom2 - 0.1;
if (carx2 < 140) {
vroom2 = vroom2 - 0.5;
}
} else {
vroom2 = 1;
}
}
if (compdead != 1) {
loopvar = 0;
while (loopvar < compspeed) {
loopvar = loopvar + 1;
tellTarget ("comp1path") {
nextFrame();
};
}
if (1 >= compspeed) {
compspeed = compspeed + 0.01;
}
}
if ((car1dead != 1) and (compdead != 1)) {
comp1x = getProperty("comp1path.comp1", _x) + getProperty("comp1path", _x);
comp1y = getProperty("comp1path/comp1", _y) + getProperty("comp1path", _y);
car1comp1_diffx = comp1x - carx;
car1comp1_diffy = comp1y - cary;
if (Number(car1comp1_diffx) < 0) {
car1comp1_diffx = car1comp1_diffx * -1;
}
if (Number(car1comp1_diffy) < 0) {
car1comp1_diffy = car1comp1_diffy * -1;
}
car1comp1 = Number(car1comp1_diffx) + Number(car1comp1_diffy);
if (Number(car1comp1) < 30) {
if (car1comp1collision < 1) {
hairline = 0.01;
compspeed = 0;
car1comp1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 13.5);
stat_car1health = stat_car1health - 10;
stat_comphealth = stat_comphealth - 10;
}
} else {
car1comp1collision = 0;
}
}
if ((car2dead != 1) and (compdead != 1)) {
comp1x = getProperty("comp1path.comp1", _x) + getProperty("comp1path", _x);
comp1y = getProperty("comp1path/comp1", _y) + getProperty("comp1path", _y);
car2comp1_diffx = comp1x - carx2;
car2comp1_diffy = comp1y - cary2;
if (Number(car2comp1_diffx) < 0) {
car2comp1_diffx = car2comp1_diffx * -1;
}
if (Number(car2comp1_diffy) < 0) {
car2comp1_diffy = car2comp1_diffy * -1;
}
car2comp1 = Number(car2comp1_diffx) + Number(car2comp1_diffy);
if (Number(car2comp1) < 30) {
if (car2comp1collision < 1) {
hairline2 = 0.01;
compspeed = 0;
car2comp1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 13.5);
stat_car2health = stat_car2health - 10;
stat_comphealth = stat_comphealth - 10;
}
} else {
car2comp1collision = 0;
}
}
if ((car1dead != 1) and (car2dead != 1)) {
car2car1_diffx = carx - carx2;
car2car1_diffy = cary - cary2;
if (Number(car2car1_diffx) < 0) {
car2car1_diffx = car2car1_diffx * -1;
}
if (Number(car2car1_diffy) < 0) {
car2car1_diffy = car2car1_diffy * -1;
}
car2car1 = Number(car2car1_diffx) + Number(car2car1_diffy);
if (Number(car2car1) < 30) {
if (car2car1collision < 1) {
hairline2 = 0.01;
hairline = 0.01;
car2car1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 13.5);
stat_car1health = stat_car1health - 10;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 13.5);
stat_car2health = stat_car2health - 10;
}
} else {
car2car1collision = 0;
}
}
if (damage == true) {
if ((0 >= stat_car1health) and (car1dead != 1)) {
car1dead = 1;
tellTarget ("_root.car") {
gotoAndPlay (5);
};
stat_car1health = "";
setProperty("_root.stat_car1health", _alpha , "25");
setProperty("_root.stat_car1speed", _alpha , "25");
}
if ((0 >= stat_car2health) and (car2dead != 1)) {
car2dead = 1;
tellTarget ("_root.car2") {
gotoAndPlay (5);
};
stat_car2health = "";
setProperty("_root.stat_car2health", _alpha , "25");
setProperty("_root.stat_car2speed", _alpha , "25");
}
if ((0 >= stat_comphealth) and (compdead != 1)) {
compdead = 1;
tellTarget ("_root.comp1path.comp1") {
gotoAndPlay (5);
};
stat_comphealth = "";
}
} else {
stat_car2health = 0;
stat_car1health = 0;
}
if ((car1lapcount == 1) and ((carx < 150) and (185 < cary))) {
car1lapcount = 0;
car1laps1 = car1laps1 + 1;
}
if ((500 < carx) and (cary < 200)) {
car1lapcount = 1;
}
if ((car2lapcount == 1) and ((carx2 < 150) and (185 < cary2))) {
car2lapcount = 0;
car2laps1 = car2laps1 + 1;
}
if ((500 < carx2) and (cary2 < 200)) {
car2lapcount = 1;
}
if (laps < car1laps1) {
if (car1dead != 1) {
car1position = position;
position = position + 1;
p1time = timer;
car1dead = 1;
setProperty("_root.car", _alpha , "40");
}
if (0 < hairline) {
hairline = hairline - 3;
if ((90 >= Number(car_rotate)) and (Number(car_rotate) >= Number(-90))) {
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carspeedy - ymov);
} else {
setProperty("/car", _y , Number(cary) + Number(ymov));
setProperty("/carspeed", _y , Number(carspeedy) + Number(ymov));
}
if (Number(car_rotate) < 0) {
setProperty("/car", _x , carx - xmov);
setProperty("/carspeed", _x , carspeedx - xmov);
} else {
setProperty("/car", _x , Number(carx) + Number(xmov));
setProperty("/carspeed", _x , Number(carspeedx) + Number(xmov));
}
} else {
hairline = 0;
}
}
if (laps < car2laps1) {
if (car2dead != 1) {
car2position = position;
position = position + 1;
p2time = timer;
car2dead = 1;
setProperty("_root.car2", _alpha , "40");
}
if (0 < hairline2) {
hairline2 = hairline2 - 3;
if ((90 >= Number(car_rotate2)) and (Number(car_rotate2) >= Number(-90))) {
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carspeedy2 - ymov2);
} else {
setProperty("/car2", _y , Number(cary2) + Number(ymov2));
setProperty("/carspeed2", _y , Number(carspeedy2) + Number(ymov2));
}
if (Number(car_rotate2) < 0) {
setProperty("/car2", _x , carx2 - xmov2);
setProperty("/carspeed2", _x , carspeedx2 - xmov2);
} else {
setProperty("/car2", _x , Number(carx2) + Number(xmov2));
setProperty("/carspeed2", _x , Number(carspeedx2) + Number(xmov2));
}
} else {
hairline2 = 0;
}
}
if (laps < comp1laps1) {
if (compdead != 1) {
compposition = position;
position = position + 1;
comptime = timer;
compdead = 1;
setProperty("_root.comp1path", _alpha , "40");
}
if (0 < comspeed) {
compspeed = compspeed - 0.1;
} else {
compspeed = 0;
}
}
if (((car1laps1 == laps) or (car2laps1 == laps)) or (comp1laps1 == laps)) {
setProperty("_root.checkflag", _visible , true);
}
if ((car1dead == 1) and (car2dead == 1)) {
if (laps < car1laps1) {
car1laps1 = laps;
} else {
p1time = "dnf";
car1position = 5;
}
if (laps < car2laps1) {
car2laps1 = laps;
} else {
p2time = "dnf";
car2position = 5;
}
if (laps < comp1laps1) {
comp1laps1 = laps;
} else {
comptime = "dnf";
compposition = 5;
}
gotoAndPlay (262);
}
Frame 255
gotoAndPlay (254);
Frame 271
stopAllSounds();
Frame 272
gotoAndPlay (438);
Frame 273
setProperty("_root.stat_car1speed.bar2", _width , 1);
stat_car1speed = 0;
setProperty("_root.stat_car1health.bar2", _width , 1);
stat_car1health = 100;
setProperty("_root.stat_car2speed.bar2", _width , 1);
stat_car2speed = 0;
setProperty("_root.stat_car2health.bar2", _width , 1);
stat_car2health = 100;
stat_comphealth = 50;
timer = 0;
if (car1play == false) {
setProperty("_root.car", _visible , false);
car1dead = 1;
setProperty("_root.car", _x , "-100");
}
if (car2play == false) {
setProperty("_root.car2", _visible , false);
car2dead = 1;
setProperty("_root.car2", _x , "-200");
}
if (compplay == false) {
setProperty("_root.comp1path", _visible , false);
compdead = 1;
setProperty("_root.comp1path", _x , "-1000");
setProperty("_root.comp1path", _y , "-1000");
}
if (damage == false) {
setProperty("_root.stat_car1health", _visible , false);
setProperty("_root.stat_car2health", _visible , false);
}
Frame 358
gamespeed = 5;
setProperty("/carspeed/hairline", _yscale , 1);
setProperty("/carspeed/hairline", _visible , false);
setProperty("/carspeed/hairline", _yscale , Number(getProperty("/carspeed/hairline", _height)) + 30);
hairline = 5;
setProperty("/carspeed2/hairline", _yscale , 1);
setProperty("/carspeed2/hairline", _visible , false);
setProperty("/carspeed2/hairline", _yscale , Number(getProperty("/carspeed2/hairline", _height)) + 30);
hairline2 = 5;
compspeed = 1;
comp1laps1 = 1;
car1laps1 = 0;
car1lapcount = 1;
car2laps1 = 0;
car2lapcount = 1;
car1comp1collision = 0;
car2comp1collision = 0;
car2car1collision = 0;
vroom = 1;
slowdown = 1;
slowdown2 = 1;
vroom2 = 1;
jump1 = 0;
jump2 = 0;
position = 1;
setProperty("_root.checkflag", _visible , false);
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
Frame 359
setProperty("_root.stat_car1speed.bar2", _width , getProperty("/carspeed/hairline", _height) * 10);
stat_car1speed = getProperty("/carspeed/hairline", _height) * 20;
setProperty("_root.stat_car2speed.bar2", _width , getProperty("/carspeed2/hairline", _height) * 10);
stat_car2speed = getProperty("/carspeed2/hairline", _height) * 20;
hairlineheight = getProperty("/carspeed/hairline", _height);
xmov = ((getProperty("/carspeed", _width) - 1) * vroom) / slowdown;
ymov = ((getProperty("/carspeed", _height) - 1) * vroom) / slowdown;
carx = getProperty("/car", _x);
cary = getProperty("/car", _y);
car_rotate = getProperty("/car", _rotation);
carspeedx = getProperty("/carspeed", _x);
carspeedy = getProperty("/carspeed", _y);
if (car1dead != 1) {
if (Key.isDown(38)) {
if (Number(hairline) < 54) {
hairline = Number(hairline) + 2;
}
} else if (5 < Number(hairline)) {
hairline = hairline - 2;
}
if (Key.isDown(37)) {
if (((carx < 580) and (465 < carx)) and (300 < cary)) {
setProperty("/car", _rotation , getProperty("/car", _rotation) - 2);
setProperty("/carspeed", _rotation , getProperty("/carspeed", _rotation) - 2);
} else {
setProperty("/car", _rotation , getProperty("/car", _rotation) - 8);
setProperty("/carspeed", _rotation , getProperty("/carspeed", _rotation) - 8);
}
}
if (Key.isDown(39)) {
if (((carx < 580) and (465 < carx)) and (300 < cary)) {
setProperty("/car", _rotation , Number(getProperty("/car", _rotation)) + 2);
setProperty("/carspeed", _rotation , Number(getProperty("/carspeed", _rotation)) + 2);
} else {
setProperty("/car", _rotation , Number(getProperty("/car", _rotation)) + 8);
setProperty("/carspeed", _rotation , Number(getProperty("/carspeed", _rotation)) + 8);
}
}
if (Key.isDown(40)) {
if (0.1 < Number(hairline)) {
hairline = hairline - 2;
}
}
if ((90 >= Number(car_rotate)) and (Number(car_rotate) >= Number(-90))) {
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carspeedy - ymov);
} else {
setProperty("/car", _y , Number(cary) + Number(ymov));
setProperty("/carspeed", _y , Number(carspeedy) + Number(ymov));
}
if (Number(car_rotate) < 0) {
setProperty("/car", _x , carx - xmov);
setProperty("/carspeed", _x , carspeedx - xmov);
} else {
setProperty("/car", _x , Number(carx) + Number(xmov));
setProperty("/carspeed", _x , Number(carspeedx) + Number(xmov));
}
if (Number(cary) < 40) {
setProperty("/car", _y , 41);
setProperty("/carspeed", _y , 41);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
} else if (360 < Number(cary)) {
setProperty("/car", _y , 359);
setProperty("/carspeed", _y , 359);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (Number(carx) < 20) {
setProperty("/car", _x , 21);
setProperty("/carspeed", _x , 21);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
} else if (625 < Number(carx)) {
setProperty("/car", _x , 624);
setProperty("/carspeed", _x , 624);
hairline = 0.1;
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((145 < carx) and (carx < 525)) and ((185 < cary) and (cary < 200))) {
hairline = 0.1;
setProperty("/car", _y , 184);
setProperty("/carspeed", _y , 184);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((145 < carx) and (carx < 525)) and ((225 < cary) and (cary < 250))) {
hairline = 0.1;
setProperty("/car", _y , 251);
setProperty("/carspeed", _y , 251);
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((120 < carx) and (carx < 165)) and ((200 < cary) and (cary < 248))) {
hairline = 0.1;
setProperty("/car", _x , carx - (xmov * 1.5));
setProperty("/carspeed", _x , carx - (xmov * 1.5));
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if (((500 < carx) and (carx < 530)) and ((200 < cary) and (cary < 248))) {
hairline = 0.1;
setProperty("/car", _x , carx - (xmov * 1.5));
setProperty("/carspeed", _x , carx - (xmov * 1.5));
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 6.725);
stat_car1health = stat_car1health - 5;
tellTarget ("_root.car1sounds") {
gotoAndPlay ("crash1");
};
}
if ((((130 < carx) and (carx < 225)) and (310 < cary)) and (cary < 340)) {
if (vroom < 2) {
tellTarget ("_root.car1sounds") {
gotoAndStop ("vroom");
};
}
vroom = 2;
} else if (1 < vroom) {
vroom = vroom - 0.1;
if (540 < carx) {
vroom = vroom - 0.5;
}
} else {
vroom = 1;
}
if ((((250 < carx) and (carx < 339)) and (cary < 220)) and (jump1 == 0)) {
slowdown = 5;
if (slowdown < 3) {
tellTarget ("_root.car1sounds") {
gotoAndPlay ("gravel");
};
}
} else {
slowdown = 1;
}
}
if (((((340 < carx) and (carx < 355)) and (100 < stat_car1speed)) and ((cary < 140) and (60 < cary))) and (jump1 == 0)) {
jump1 = 1;
tellTarget ("car") {
gotoAndPlay ("jump");
};
}
if (((((340 < carx2) and (carx2 < 355)) and (100 < stat_car2speed)) and ((cary2 < 140) and (60 < cary2))) and (jump2 == 0)) {
jump2 = 1;
tellTarget ("car2") {
gotoAndPlay ("jump");
};
}
hairlineheight2 = getProperty("/carspeed2/hairline", _height);
xmov2 = ((getProperty("/carspeed2", _width) - 1) * vroom2) / slowdown2;
ymov2 = ((getProperty("/carspeed2", _height) - 1) * vroom2) / slowdown2;
carx2 = getProperty("/car2", _x);
cary2 = getProperty("/car2", _y);
car_rotate2 = getProperty("/car2", _rotation);
carspeedx2 = getProperty("/carspeed2", _x);
carspeedy2 = getProperty("/carspeed2", _y);
if (car2dead != 1) {
if (Key.isDown(87)) {
if (Number(hairline2) < 54) {
hairline2 = Number(hairline2) + 2;
}
} else if (5 < Number(hairline2)) {
hairline2 = hairline2 - 2;
}
if (Key.isDown(65)) {
if (((carx2 < 580) and (465 < carx2)) and (300 < cary2)) {
setProperty("/car2", _rotation , getProperty("/car2", _rotation) - 2);
setProperty("/carspeed2", _rotation , getProperty("/carspeed2", _rotation) - 2);
} else {
setProperty("/car2", _rotation , getProperty("/car2", _rotation) - 8);
setProperty("/carspeed2", _rotation , getProperty("/carspeed2", _rotation) - 8);
}
}
if (Key.isDown(68)) {
if (((carx2 < 580) and (465 < carx2)) and (300 < cary2)) {
setProperty("/car2", _rotation , Number(getProperty("/car2", _rotation)) + 2);
setProperty("/carspeed2", _rotation , Number(getProperty("/carspeed2", _rotation)) + 2);
} else {
setProperty("/car2", _rotation , Number(getProperty("/car2", _rotation)) + 8);
setProperty("/carspeed2", _rotation , Number(getProperty("/carspeed2", _rotation)) + 8);
}
}
if (Key.isDown(83)) {
if (0.1 < Number(hairline2)) {
hairline2 = hairline2 - 2;
}
}
if ((90 >= Number(car_rotate2)) and (Number(car_rotate2) >= Number(-90))) {
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carspeedy2 - ymov2);
} else {
setProperty("/car2", _y , Number(cary2) + Number(ymov2));
setProperty("/carspeed2", _y , Number(carspeedy2) + Number(ymov2));
}
if (Number(car_rotate2) < 0) {
setProperty("/car2", _x , carx2 - xmov2);
setProperty("/carspeed2", _x , carspeedx2 - xmov2);
} else {
setProperty("/car2", _x , Number(carx2) + Number(xmov2));
setProperty("/carspeed2", _x , Number(carspeedx2) + Number(xmov2));
}
if (Number(cary2) < 40) {
setProperty("/car2", _y , 41);
setProperty("/carspeed2", _y , 41);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
} else if (360 < Number(cary2)) {
setProperty("/car2", _y , 359);
setProperty("/carspeed2", _y , 359);
hairline = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (Number(carx2) < 20) {
setProperty("/car2", _x , 21);
setProperty("/carspeed2", _x , 21);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
} else if (625 < Number(carx2)) {
setProperty("/car2", _x , 624);
setProperty("/carspeed2", _x , 624);
hairline2 = 0.1;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((148 < carx2) and (carx2 < 530)) and ((185 < cary2) and (cary2 < 200))) {
hairline2 = 0.1;
setProperty("/car2", _y , 184);
setProperty("/carspeed2", _y , 184);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((145 < carx2) and (carx2 < 530)) and ((225 < cary2) and (cary2 < 250))) {
hairline2 = 0.1;
setProperty("/car2", _y , 251);
setProperty("/carspeed2", _y , 251);
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((135 < carx2) and (carx2 < 165)) and ((202 < cary2) and (cary2 < 248))) {
hairline2 = 0.1;
setProperty("/car2", _x , carx2 - (xmov2 * 1.5));
setProperty("/carspeed2", _x , carx2 - (xmov2 * 1.5));
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if (((500 < carx2) and (carx2 < 530)) and ((202 < cary2) and (cary2 < 248))) {
hairline2 = 0.1;
setProperty("/car2", _x , carx2 - (xmov2 * 1.5));
setProperty("/carspeed2", _x , carx2 - (xmov2 * 1.5));
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 6.725);
stat_car2health = stat_car2health - 5;
tellTarget ("_root.car2sounds") {
gotoAndPlay ("crash1");
};
}
if ((((130 < carx2) and (carx2 < 225)) and (310 < cary2)) and (cary2 < 340)) {
if (vroom2 < 2) {
tellTarget ("_root.car2sounds") {
gotoAndStop ("vroom");
};
}
vroom2 = 2;
} else if (1 < vroom2) {
vroom2 = vroom2 - 0.1;
if (540 < carx2) {
vroom2 = vroom2 - 0.5;
}
} else {
vroom2 = 1;
}
if ((((250 < carx2) and (carx2 < 339)) and (cary2 < 220)) and (jump2 == 0)) {
slowdown2 = 5;
if (slowdown2 < 3) {
tellTarget ("_root.car2sounds") {
gotoAndPlay ("gravel");
};
}
} else {
slowdown2 = 1;
}
}
if (compdead != 1) {
loopvar = 0;
while (loopvar < compspeed) {
loopvar = loopvar + 1;
tellTarget ("comp1path") {
nextFrame();
};
}
if (1 >= compspeed) {
compspeed = compspeed + 0.01;
}
}
if ((car1dead != 1) and (compdead != 1)) {
comp1x = getProperty("comp1path.comp1", _x) + getProperty("comp1path", _x);
comp1y = getProperty("comp1path/comp1", _y) + getProperty("comp1path", _y);
car1comp1_diffx = comp1x - carx;
car1comp1_diffy = comp1y - cary;
if (Number(car1comp1_diffx) < 0) {
car1comp1_diffx = car1comp1_diffx * -1;
}
if (Number(car1comp1_diffy) < 0) {
car1comp1_diffy = car1comp1_diffy * -1;
}
car1comp1 = Number(car1comp1_diffx) + Number(car1comp1_diffy);
if (Number(car1comp1) < 30) {
if (car1comp1collision < 1) {
hairline = 0.01;
compspeed = 0;
car1comp1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 13.5);
stat_car1health = stat_car1health - 10;
stat_comphealth = stat_comphealth - 10;
}
} else {
car1comp1collision = 0;
}
}
if ((car2dead != 1) and (compdead != 1)) {
comp1x = getProperty("comp1path.comp1", _x) + getProperty("comp1path", _x);
comp1y = getProperty("comp1path/comp1", _y) + getProperty("comp1path", _y);
car2comp1_diffx = comp1x - carx2;
car2comp1_diffy = comp1y - cary2;
if (Number(car2comp1_diffx) < 0) {
car2comp1_diffx = car2comp1_diffx * -1;
}
if (Number(car2comp1_diffy) < 0) {
car2comp1_diffy = car2comp1_diffy * -1;
}
car2comp1 = Number(car2comp1_diffx) + Number(car2comp1_diffy);
if (Number(car2comp1) < 30) {
if (car2comp1collision < 1) {
hairline2 = 0.01;
compspeed = 0;
car2comp1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 13.5);
stat_car2health = stat_car2health - 10;
stat_comphealth = stat_comphealth - 10;
}
} else {
car2comp1collision = 0;
}
}
if ((car1dead != 1) and (car2dead != 1)) {
car2car1_diffx = carx - carx2;
car2car1_diffy = cary - cary2;
if (Number(car2car1_diffx) < 0) {
car2car1_diffx = car2car1_diffx * -1;
}
if (Number(car2car1_diffy) < 0) {
car2car1_diffy = car2car1_diffy * -1;
}
car2car1 = Number(car2car1_diffx) + Number(car2car1_diffy);
if (Number(car2car1) < 30) {
if (car2car1collision < 1) {
hairline2 = 0.01;
hairline = 0.01;
car2car1collision = 2;
tellTarget ("_root.sounds") {
gotoAndPlay ("crash2");
};
setProperty("_root.stat_car1health.bar2", _width , getProperty("_root.stat_car1health.bar2", _width) + 13.5);
stat_car1health = stat_car1health - 10;
setProperty("_root.stat_car2health.bar2", _width , getProperty("_root.stat_car2health.bar2", _width) + 13.5);
stat_car2health = stat_car2health - 10;
}
} else {
car2car1collision = 0;
}
}
if (damage == true) {
if ((0 >= stat_car1health) and (car1dead != 1)) {
car1dead = 1;
tellTarget ("_root.car") {
gotoAndPlay (5);
};
stat_car1health = "";
setProperty("_root.stat_car1health", _alpha , "25");
setProperty("_root.stat_car1speed", _alpha , "25");
}
if ((0 >= stat_car2health) and (car2dead != 1)) {
car2dead = 1;
tellTarget ("_root.car2") {
gotoAndPlay (5);
};
stat_car2health = "";
setProperty("_root.stat_car2health", _alpha , "25");
setProperty("_root.stat_car2speed", _alpha , "25");
}
if ((0 >= stat_comphealth) and (compdead != 1)) {
compdead = 1;
tellTarget ("_root.comp1path.comp1") {
gotoAndPlay (5);
};
stat_comphealth = "";
}
} else {
stat_car2health = 0;
stat_car1health = 0;
}
if ((car1lapcount == 1) and ((carx < 150) and (185 < cary))) {
car1lapcount = 0;
car1laps1 = car1laps1 + 1;
}
if ((500 < carx) and (cary < 200)) {
car1lapcount = 1;
}
if ((car2lapcount == 1) and ((carx2 < 150) and (185 < cary2))) {
car2lapcount = 0;
car2laps1 = car2laps1 + 1;
}
if ((500 < carx2) and (cary2 < 200)) {
car2lapcount = 1;
}
if (laps < car1laps1) {
if (car1dead != 1) {
car1position = position;
position = position + 1;
p1time = timer;
car1dead = 1;
setProperty("_root.car", _alpha , "40");
}
if (0 < hairline) {
hairline = hairline - 3;
if ((90 >= Number(car_rotate)) and (Number(car_rotate) >= Number(-90))) {
setProperty("/car", _y , cary - ymov);
setProperty("/carspeed", _y , carspeedy - ymov);
} else {
setProperty("/car", _y , Number(cary) + Number(ymov));
setProperty("/carspeed", _y , Number(carspeedy) + Number(ymov));
}
if (Number(car_rotate) < 0) {
setProperty("/car", _x , carx - xmov);
setProperty("/carspeed", _x , carspeedx - xmov);
} else {
setProperty("/car", _x , Number(carx) + Number(xmov));
setProperty("/carspeed", _x , Number(carspeedx) + Number(xmov));
}
} else {
hairline = 0;
}
}
if (laps < car2laps1) {
if (car2dead != 1) {
car2position = position;
position = position + 1;
p2time = timer;
car2dead = 1;
setProperty("_root.car2", _alpha , "40");
}
if (0 < hairline2) {
hairline2 = hairline2 - 3;
if ((90 >= Number(car_rotate2)) and (Number(car_rotate2) >= Number(-90))) {
setProperty("/car2", _y , cary2 - ymov2);
setProperty("/carspeed2", _y , carspeedy2 - ymov2);
} else {
setProperty("/car2", _y , Number(cary2) + Number(ymov2));
setProperty("/carspeed2", _y , Number(carspeedy2) + Number(ymov2));
}
if (Number(car_rotate2) < 0) {
setProperty("/car2", _x , carx2 - xmov2);
setProperty("/carspeed2", _x , carspeedx2 - xmov2);
} else {
setProperty("/car2", _x , Number(carx2) + Number(xmov2));
setProperty("/carspeed2", _x , Number(carspeedx2) + Number(xmov2));
}
} else {
hairline2 = 0;
}
}
if (laps < comp1laps1) {
if (compdead != 1) {
compposition = position;
position = position + 1;
comptime = timer;
compdead = 1;
setProperty("_root.comp1path", _alpha , "40");
}
if (0 < comspeed) {
compspeed = compspeed - 0.1;
} else {
compspeed = 0;
}
}
if (((car1laps1 == laps) or (car2laps1 == laps)) or (comp1laps1 == laps)) {
setProperty("_root.checkflag", _visible , true);
}
if ((car1dead == 1) and (car2dead == 1)) {
if (laps < car1laps1) {
car1laps1 = laps;
} else {
p1time = "dnf";
car1position = 5;
}
if (laps < car2laps1) {
car2laps1 = laps;
} else {
p2time = "dnf";
car2position = 5;
}
if (laps < comp1laps1) {
comp1laps1 = laps;
} else {
comptime = "dnf";
compposition = 5;
}
gotoAndPlay (367);
}
Frame 360
gotoAndPlay (359);
Frame 376
stopAllSounds();
Frame 377
gotoAndPlay (438);
Frame 438
if (car1position == 1) {
setProperty("_root.podred", _x , 324);
setProperty("_root.podred", _y , 189);
} else if (car1position == 2) {
setProperty("_root.podred", _x , 150);
setProperty("_root.podred", _y , 220);
} else if (car1position == 3) {
setProperty("_root.podred", _x , 476);
setProperty("_root.podred", _y , 246);
} else {
tellTarget ("_root.podred") {
gotoAndStop (2);
};
setProperty("_root.podred", _x , 585);
setProperty("_root.podred", _y , 100);
}
if (car2position == 1) {
setProperty("_root.podblue", _x , 324);
setProperty("_root.podblue", _y , 189);
} else if (car2position == 2) {
setProperty("_root.podblue", _x , 150);
setProperty("_root.podblue", _y , 220);
} else if (car2position == 3) {
setProperty("_root.podblue", _x , 476);
setProperty("_root.podblue", _y , 246);
} else {
tellTarget ("_root.podblue") {
gotoAndStop (2);
};
setProperty("_root.podblue", _x , 585);
setProperty("_root.podblue", _y , 165);
}
if (compposition == 1) {
setProperty("_root.podyellow", _x , 324);
setProperty("_root.podyellow", _y , 189);
} else if (compposition == 2) {
setProperty("_root.podyellow", _x , 150);
setProperty("_root.podyellow", _y , 220);
} else if (compposition == 3) {
setProperty("_root.podyellow", _x , 476);
setProperty("_root.podyellow", _y , 246);
} else {
tellTarget ("_root.podyellow") {
gotoAndStop (2);
};
setProperty("_root.podyellow", _x , 585);
setProperty("_root.podyellow", _y , 230);
}
Frame 447
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 2
stop();
Symbol 17 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 5
Set("..:compdead", 1);
Symbol 17 MovieClip Frame 14
stop();
_x = -600;
_y = -600;
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 5
Set("..:car2dead", 1);
Symbol 21 MovieClip Frame 15
stop();
_x = -200;
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 5
Set("..:car1dead", 1);
Symbol 27 MovieClip Frame 15
stop();
_x = "-100";
Symbol 27 MovieClip Frame 30
Set("..:jump1", 0);
gotoAndPlay (1);
Symbol 35 Button
on (release) {
play();
}
Symbol 45 Button
on (release) {
if (car1play == true) {
tellTarget ("_root.check1") {
gotoAndStop (2);
};
car1play = false;
} else {
car1play = true;
tellTarget ("_root.check1") {
gotoAndStop (1);
};
}
}
Symbol 46 Button
on (release) {
if (car2play == true) {
tellTarget ("_root.check2") {
gotoAndStop (2);
};
car2play = false;
} else {
car2play = true;
tellTarget ("_root.check2") {
gotoAndStop (1);
};
}
}
Symbol 47 Button
on (release) {
if (compplay == true) {
tellTarget ("_root.check3") {
gotoAndStop (2);
};
compplay = false;
} else {
compplay = true;
tellTarget ("_root.check3") {
gotoAndStop (1);
};
}
}
Symbol 48 Button
on (release) {
if (damage == true) {
tellTarget ("_root.check4") {
gotoAndStop (2);
};
damage = false;
} else {
damage = true;
tellTarget ("_root.check4") {
gotoAndStop (1);
};
}
}
Symbol 49 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 5
Set("..:car2dead", 1);
Symbol 49 MovieClip Frame 15
stop();
_x = -200;
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 5
Set("..:car1dead", 1);
Symbol 50 MovieClip Frame 15
stop();
_x = "-100";
Symbol 50 MovieClip Frame 30
Set("..:jump1", 0);
gotoAndPlay (1);
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 2
stop();
Symbol 58 Button
on (release) {
stopAllSounds();
gotoAndPlay (62);
}
Symbol 62 Button
on (release) {
stopAllSounds();
gotoAndPlay (168);
}
Symbol 66 Button
on (release) {
stopAllSounds();
gotoAndPlay (273);
}
Symbol 77 MovieClip Frame 24
Set("..:timer", ..:timer + 1);
gotoAndPlay (1);
Symbol 80 MovieClip Frame 3
stop();
Symbol 80 MovieClip Frame 22
stop();
Symbol 80 MovieClip Frame 25
stop();
Symbol 80 MovieClip Frame 42
stop();
Symbol 82 Button
on (keyPress "<Space>") {
tellTarget ("_root.sounds") {
gotoAndPlay ("honk");
};
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 10
stop();
Symbol 86 MovieClip Frame 33
stop();
Symbol 86 MovieClip Frame 60
stop();
Symbol 86 MovieClip Frame 85
gotoAndPlay (65);
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 10
stop();
Symbol 87 MovieClip Frame 33
stop();
Symbol 87 MovieClip Frame 60
stop();
Symbol 87 MovieClip Frame 85
gotoAndPlay (65);
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 5
Set("..:compdead", 1);
Symbol 88 MovieClip Frame 14
stop();
_x = -600;
_y = -600;
Symbol 89 MovieClip Frame 1
Set("..:comp1laps1", ..:comp1laps1 + 1);
Symbol 89 MovieClip Frame 2
stop();
Symbol 89 MovieClip Frame 35
if (((..:cary < 100) and (..:carx < 500)) or ((..:cary2 < 100) and (..:carx2 < 500))) {
play();
} else {
gotoAndPlay (102);
}
Symbol 89 MovieClip Frame 101
gotoAndPlay (169);
Symbol 89 MovieClip Frame 310
gotoAndPlay (1);
Symbol 92 MovieClip Frame 1
setProperty("hairline", _yscale , ..:hairline);
if (20 < Number(getProperty("hairline", _height))) {
Set("..:hairline", 20);
}
Symbol 92 MovieClip Frame 2
gotoAndPlay (1);
Symbol 94 MovieClip Frame 1
setProperty("hairline", _yscale , ..:hairline2);
if (20 < Number(getProperty("hairline", _height))) {
Set("..:hairline2", 20);
}
Symbol 94 MovieClip Frame 2
gotoAndPlay (1);
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 4
Set("..:car2dead", 1);
Symbol 95 MovieClip Frame 14
stop();
_x = -200;
Symbol 95 MovieClip Frame 30
Set("..:jump2", 0);
gotoAndPlay (1);
Symbol 128 MovieClip Frame 15
gotoAndPlay (1);
Symbol 131 Button
on (keyPress "<Space>") {
tellTarget ("_root.sounds") {
gotoAndPlay ("honk");
};
}
Symbol 132 MovieClip Frame 1
Set("..:comp1laps1", ..:comp1laps1 + 1);
Symbol 132 MovieClip Frame 2
stop();
Symbol 132 MovieClip Frame 296
gotoAndPlay (1);
Symbol 142 Button
on (keyPress "<Space>") {
tellTarget ("_root.sounds") {
gotoAndPlay ("honk");
};
}
Symbol 143 MovieClip Frame 1
Set("..:comp1laps1", ..:comp1laps1 + 1);
Symbol 143 MovieClip Frame 2
stop();
Symbol 143 MovieClip Frame 187
if (..:compspeed < 0.5) {
gotoAndPlay (247);
}
Symbol 143 MovieClip Frame 246
gotoAndPlay (373);
Symbol 143 MovieClip Frame 410
gotoAndPlay (1);
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 2
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 2
stop();
Symbol 173 MovieClip Frame 1
stop();
Symbol 173 MovieClip Frame 2
stop();
Symbol 180 Button
on (release) {
car1dead = 0;
car2dead = 0;
compdead = 0;
stopAllSounds();
gotoAndPlay (1);
}