sBladeBot 0 -1 0 0 oEnemy <undefined> 1 603 7 0 0 -1 2 self 0 0 1 event_inherited(); canbeX = 0; myhealth = 140; freezehp = 100; //damage = 60; damage = global.mod_bladebotDamage; //damage = 1; stuntime = 4; hpush = 6; vpush = -3; hitmissileexpl = 1; hitsound = sndRobotHit1; deathsound = sndRobotExpl; canfreeze = 1; platyoffset = -6; frozenspr = sBladeBotFrozen; flipx = 1; target = 0; state = 0; statetime = 0; hitemp = 1; empspr = sBladeBot; facing = 1; turnedges = 1; direction = 0; speed = 4; alarm[0] = 1; col_edge = 0; 1 603 7 0 0 -1 2 self 0 0 1 if (facing == -1) direction = 180; 1 603 7 0 0 -1 2 self 0 0 1 event_inherited(); if (state == 0) { col_edge = 0; if (direction == 0) { if (collision_line(x + 8, y - 4, x + 8, y + 4, oSolid, true, true)) { if (facing == 1) { direction = 270; } else direction = 90; x = xprevious; y = yprevious; } else if (turnedges) { if (facing == 1) { if (!collision_line(x - 8, y + 12, x + 8, y + 12, oSolid, true, true)) direction = 270; } else if (!collision_line(x - 8, y - 12, x + 8, y - 12, oSolid, true, true)) direction = 90; } } else if (direction == 90) { if (collision_line(x - 4, y - 8, x + 4, y - 8, oSolid, true, true)) { if (facing == 1) { direction = 0; } else direction = 180; x = xprevious; y = yprevious; } else if (turnedges) { if (facing == 1) { if (!collision_line(x + 12, y - 8, x + 12, y + 8, oSolid, true, true)) direction = 0; } else if (!collision_line(x - 12, y - 8, x - 12, y + 8, oSolid, true, true)) direction = 180; } } else if (direction == 180) { if (collision_line(x - 8, y - 4, x - 8, y + 4, oSolid, true, true)) { if (facing == 1) { direction = 90; } else direction = 270; x = xprevious; y = yprevious; } else if (turnedges) { if (facing == 1) { if (!collision_line(x - 8, y - 12, x + 8, y - 12, oSolid, true, true)) direction = 90; } else if (!collision_line(x - 8, y + 12, x + 8, y + 12, oSolid, true, true)) direction = 270; } } else if (direction == 270) { if (collision_line(x - 4, y + 8, x + 4, y + 8, oSolid, true, true)) { if (facing == 1) { direction = 180; } else direction = 0; x = xprevious; y = yprevious; } else if (turnedges) { if (facing == 1) { if (!collision_line(x - 12, y - 8, x - 12, y + 8, oSolid, true, true)) direction = 180; } else if (!collision_line(x + 12, y - 8, x + 12, y + 8, oSolid, true, true)) direction = 0; } } // if (direction == 0) else if (turnedges && !collision_rectangle(x - 12, y - 12, x + 12, y + 12, oSolid, true, true)) turnedges = 0; if (facing != 1) image_xscale = -1; image_angle -= 20; if (image_angle < -360) image_angle += 360; } // if (state == 0) if (state == 100) { enemy_death2(); repeat (20) instance_create(x, y, oDebris); } 1 603 7 0 0 -1 2 self 0 0 1 instance_destroy(); 1 603 7 0 0 -1 2 self 0 0 1 event_inherited(); draw_sprite(sBladeBotEye, -1, x, y); 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 -1