500.010005001000.01filenamelevel7$0.mmldate1237495136000urlG:\SURGE\MW models\game files\level7$0.mmlsize40202codebaseG:\SURGE\MW models\game files// Initialize Motion Map Variables
define %accelerationCheck 0;
define %deccelerationCheck 0;
define %constantVelocityCheck 0;
define %previousVelocity 0;Set Initial Values at the Beginning of the Layer500Set Initials Layer1// Script to detect the velocity of the puck at a specified location in the module
if(%atom[0].rx < %line[0].x1);
if((%atom[0].ry > 3.3) and (%atom[0].ry < 12.7));
// Obtains the needed values
set %previousVelocity 0;
set %accelerationCheck 1;
endif;
endif;Compare Velocity value - Layer 11000Compare Velocity 1// Checks for acceleration
define %currentVelocity abs(%atom[0].vx);
if(%rectangle[9].particlecount == 1);
if(%currentVelocity > %previousVelocity + 20); // 20 is an offset
print Current - %currentVelocity;
print Previous - %previousVelocity;
print Good - Increasing Velocity;
else;
print You Loser - Accelerate!
set %accelerationCheck 0;
endif;
set %previousVelocity %currentVelocity;
endif;Motion Map1000Motion Map1// This script is designed to create a motion map.
// An ellipse is added to the game every second.
// Checks to see if SURGE is located in the first layer boundaries
// This currently only checks based on the x positions. y position checking will need to be added
if((%atom[0].rx > %line[0].x1) and (%atom[0].rx < %line[1].x1) and (%atom[0].ry > 3.3) and (%atom[0].ry < 12.7));
add ellipse (%atom[0].rx, %atom[0].ry, 1,1);
endif;Checks the Ending Values500Check Ending Values1if(%rectangle[10].particlecount == 1);
set %atom[0].vx 0;
if(%accelerationCheck == 1);
print Good job on Layer 1;
else;
print Thank you, Come Again (Apu style)
endif;
endif;Sets the Initial Values for Layer 250Set Initial Layer2// Checks the location based on both dimensions
if(%atom[0].rx > %line[2].x1);
if((%atom[0].ry > 20.9) and (%atom[0].ry < 28));
set %previousVelocity 0;
set %constantVelocityCheck 1;
endif;
endif;Creates a Motion Map for Layer 21000Motion Map2// This script is designed to create a motion map.
// An ellipse is added to the game every second.
// Checks to see if SURGE is located in the first layer boundaries
// This currently only checks based on the x positions. y position checking will need to be added
if((%atom[0].rx > %line[3].x1) and (%atom[0].rx < %line[2].x1) and (%atom[0].ry > 20.9) and (%atom[0].ry < 28));
add ellipse (%atom[0].rx, %atom[0].ry, 1,1);
endif;Checks the Ending Values for Layer 2500Check Ending Values2// Determines the number of ellipses placed once a particular location is reached
// The ellipse creation script must be turned off before the inside of this conditional is processed
if(%rectangle[11].particlecount == 1);
set %atom[0].vx 0;
if(%constantVelocityCheck == 1);
print Good job on Layer 2;
else;
print Thank you, Come Again (Apu style);
endif;
endif;Sets the Initial Values for Layer 3500Set Initial3// Checks the location based on both dimensions
if(%atom[0].rx < %line[4].x1);
if((%atom[0].ry > 36) and (%atom[0].ry < 43.3));
set %previousVelocity 0;
set %deccelerationCheck 1;
endif;
endif;Motion Map for Layer 31000Motion Map3// This script is designed to create a motion map.
// An ellipse is added to the game every second.
// Checks to see if SURGE is located in the first layer boundaries
// This currently only checks based on the x positions. y position checking will need to be added
if((%atom[0].rx > %line[4].x1) and (%atom[0].rx < %line[5].x1) and (%atom[0].ry > 36) and (%atom[0].ry < 43.3));
add ellipse (%atom[0].rx, %atom[0].ry, 1,1);
endif;Check the Ending Values of Layer 3500Check Ending Values 3// Determines the number of ellipses placed once a particular location is reached
// The ellipse creation script must be turned off before the inside of this conditional is processed
if(%rectangle[8].particlecount == 1);
set %atom[0].vx 0;
if(%deccelerationCheck == 1);
print Good job on Layer 3;
else;
print Thank you, Come Again (Apu style)
endif;
endif;
Save Fuzzy500Save Fuzzydefine %dx0 %atom[0].rx + .5*%atom[0].sigma;
define %dy0 %atom[0].ry + .5*%atom[0].sigma;
define %dx3 %atom[0].rx - .5*%atom[0].sigma;
define %dy3 %atom[0].ry - .5*%atom[0].sigma;
define %ox %rectangle[8].x + %rectangle[8].width;
define %oy %rectangle[8].y + %rectangle[8].height;
if (((%dx0 > %rectangle[8].x and %dx0 < %ox and %dy0 > %rectangle[8].y and %dy0 < %oy) or (%dx3 > %rectangle[8].x and %dx3 < %ox and %dy3 > %rectangle[8].y and %dy3 < %oy)));
set %image[1].visible on;
set %rectangle[6].visible off;
set %textbox[0].visible on;
stop;
else;
set %image[1].visible off;
endif;Compare Velocity - Layer 2700Compare Velocity2// Checks for acceleration
if(%rectangle[1].particlecount == 1);
if(%previousVelocity == 0);
set %previousVelocity %currentVelocity;
else;
if(%currentVelocity + 50 > %previousVelocity);
if(%currentVelocity - 50 < %previousVelocity);
print Current - %currentVelocity;
print Previous - %previousVelocity;
print Good - Constant Velocity;
else;
print Current - %currentVelocity;
print Previous - %previousVelocity;
print Keep the Same Velocity!
set %constantVelocityCheck 0;
endif;
else;
print Keep the Same Velocity!
set %constantVelocityCheck 0;
endif;
set %previousVelocity %currentVelocity;
endif;
endif;Compares the Velocity of the 3rd Layer1000Compare Velocity 3// Checks for acceleration
if(%rectangle[12].particlecount == 1);
if(%previousVelocity == 0);
set %previousVelocity %currentVelocity;
else;
if(%currentVelocity < %previousVelocity - 20); // 20 is an offset that is much less than the change due to a single impulse.
print Current - %currentVelocity;
print Previous - %previousVelocity;
print Good - Decreasing Velocity;
else;
print Deccelerate!
set %deccelerationCheck 0;
endif;
set %previousVelocity %currentVelocity;
endif;
endif;Layer 3 Launcher300Layer 3 launcherif(%rectangle[0].particlecount == 1);
set %atom[0].vx 3000;
endif;1.0None2550255255SpaceshipSmall.gifclass org.concord.mw2d.models.Atom11510.055.0LimeGreenFuzzy-smallest.gif116false899.0360.044182150.080.0-95.044192823.079.5-93.0441112823.0244.0-70.0441122150.0244.0-71.0441132150.0396.0-73.0441142823.0397.0-72.000255255255255025570.0141.0106.0362.071.011false673.0149.5207.50112525529.012true994.02.03.080.013true873.0-1.5128.0464.014true22.0974.033.080.015true867.0108.0280.0288.016true32.02.0209.064.017true939.035.0434.012812825525570.011060.0902.0362.096.0118false673.0150.533.097.0119false100.0873.033.072.0120false77.034.0209.072.0121false673.0149.5361.02true9123982552551282551172Thank You!false814.0343.031.0E-431.575.520.02