Modding MI

Glitch Fixing
          Fire Glitch
          Tutorial Glitch [dragonthief]



Fire Glitch
This fixes the glitch that makes fire stay in-game constantly if you quit a game while someone is alight.
It also fixes the glitch that makes the fire and tazer bar stay in-game if you quit while holding a flamethrower or tazer.

Frame 6 / flame (Symbol 19)
Line 41
     }
}

Replace that with:

     }
     if(_root._currentframe != 6){
          removeMovieClip(this);
     }
}

Frame 6 / clip (mc.clip)
Line 101
onClipEvent(enterFrame) {
     _visible=(_root._currentFrame==_root.gameframe);
}

Replace that with:

onClipEvent(enterFrame) {
     if(_root._currentframe != 6){
          _root.clip.unloadgun();
     }
}



Tutorial Glitch
This fixes the glitch that stops the Tutorial Mode from working.

          Dragontheif:
Frame 5 / mbu (mc.menu.button) / bu.invis
Line 38
//EXPERIMENT
_root.gotoAndStop("game");
_root.experiment=true;
_root.ai=true;
_root.invincibility=false;
_root.autospawn=false;
_root.killmenu(0);

Replace that with:

//EXPERIMENT
_root.experiment=true;
_root.ai=true;
_root.invincibility=false;
_root.autospawn=false;
_root.killmenu(0);

Frame 5 / scripter (mc.scripter)
Line 15
function touchBox() {
     boxes--;
}

Frame 5 / scripter (mc.scripter)
Line 87
} else if (mode==4) {
     boxes=action[4];
}

Frame 5 / scripter (mc.scripter)
Line 106
if (timer<0 && mode!=3 && _root.activeen<=maxguys) {
     nextevent();
}

Replace that with:

if (timer<0 && mode!=3 && _root.activeen<=maxguys && boxes<=0) {
     nextevent();
}

Replace the whole of Frame 5 / tutor (mc.tutor) with:
onClipEvent(load) {
     //script
     tutorial=new Array(
     new Array("_root","setai","num:0",0,0),
     new Array("_root","sethud","str:Welcome to the tutorial. You will now learn all of the controls.",1,90),
     new Array("_root","sethud","str:To move left, press "+_root.getname(_root.keys[_root.ki["left"]])+". To move right, press "+_root.getname(_root.keys[_root.ki["right"]])+".",1,120),
     new Array("_root","makeBox","num:40^num:350",0,0),
     new Array("_root","makeBox","num:560^num:350",0,0),
     new Array("_root","sethud","str:Touch the boxes to continue.",4,2),
     new Array("_root","sethud","str:To jump, press "+_root.getname(_root.keys[_root.ki["jump"]])+". Press it again in midair to double-jump.",1,120),
     new Array("_root","makeBox","num:300^num:100",0,0),
     new Array("_root","sethud","str:Touch the box to continue.",4,1),
     new Array("_root.tgun","makegun","num:2",0,0),
     new Array("_root","sethud","str:Try grabbing this gun Put your hand over with the mouse it and click it to pick it up.",1,180),
     new Array("_root","sethud","str:Aim the gun by moving your hand, and click to shoot it.",1,210),
     new Array("_root.gen","makeguy","num:0^num:0^num:40^num:-5^num:1",0,0),
     new Array("_root.gen","makeguy","num:0^num:0^num:560^num:-5^num:1",0,0),
     new Array("_root","sethud","str:Try attacking these dummies. You can hurt them by shooting them, or by swinging your fist at them to punch.",2,0),
     new Array("_root.tgun","makegun","num:6",0,0),
     new Array("_root","sethud","str:To holster your gun so you can pick up another, press "+_root.getname(_root.keys[_root.ki["switch"]])+".",1,150),
     new Array("_root","sethud","str:Now you can carry a second gun. Press "+_root.getname(_root.keys[_root.ki["switch"]])+" again to switch between them.",1,150),
     new Array("_root","sethud","str:Now, try throwing your gun away by swinging your arm and pressing "+_root.getname(_root.keys[_root.ki["throw"]])+".",1,150),
     new Array("_root","sethud","str:You can give yourself an advantage in combat by pressing "+_root.getname(_root.keys[_root.ki["bullettime"]])+" to toggle bullet time.",1,150),
     new Array("_root","sethud","str:More time is added to the meter every time you kill an enemy.",1,150),
     new Array("_root.tgun","makegun","num:26",0,0),
     new Array("_root","sethud","str:Pick up the jetpack like you would pick up a gun. (Your hand must be empty).",1,150),
     new Array("_root","sethud","str:Press shift to activate/deactivate it, and your directional keys to move around.",1,150),
     new Array("_root","sethud","str:You're now ready to get started! I recommend you try experiment before the main game. Press "+_root.getname(_root.keys[_root.ki["quit"]])+" to return to the main menu.",3,0)
     );
}

Frame 3
Line 28
//function-o-rama

Replace that with:

//function-o-rama
function makeBox(x,y) {
     _root.level++;
     duplicateMovieClip(touchBox,"touchBox"+_root.level,_root.level);
     tb=eval("_root.touchbox"+_root.level);
     tb._x=x;
     tb._y=y;
     tb.gen=false;
}

Make a movieclip in Frame 5, and name it touchBox. For the original MI, this is a 20x20 red square with a black border.
Give it the following actionscript:

onClipEvent(load) {
     if (gen!=false) _visible=false;
}
onClipEvent(enterFrame) {
     if (gen==false) {
          if (this.hitTest(_root.player)) {
               _root.scripter.touchBox();
               removeMovieClip(this);
          }
     }
}