Path: blob/master/Sonic 2/Scripts/MPZ/Eggman.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Eggman Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// Using MPZEggman as a prefix here because there's like 12 "Eggman" objects in the game so its less confusing this way89// ========================10// Aliases11// ========================1213private alias object.value1 : object.originPos.y14private alias object.value2 : object.oscillationAngle15private alias object.value4 : object.timer16private alias object.value5 : object.boundsL17private alias object.value6 : object.boundsR18private alias object.value7 : object.targetPos.x19private alias object.value8 : object.moveBoundsB20private alias object.value9 : object.boundsT21private alias object.value10 : object.boundsB22private alias object.value11 : object.moveVel23private alias object.value12 : object.health24private alias object.value13 : object.invincibilityTimer25private alias object.value14 : object.exploding26private alias object.value15 : object.flameAnim27private alias object.value16 : object.flameAnimTimer28private alias object.value17 : object.balloonRadius.x29private alias object.value18 : object.balloonRadius.y30private alias object.value19 : object.balloonOffset.y31private alias object.value20 : object.activeBalloons32private alias object.value21 : object.laserID33private alias object.value22 : object.laserDelay34private alias object.value23 : object.boundsExtend.x3536// Eggman States37private alias 0 : MPZEGGMAN_AWAITPLAYER38private alias 1 : MPZEGGMAN_HOVER39private alias 2 : MPZEGGMAN_MOVEX40private alias 3 : MPZEGGMAN_MOVEXY41private alias 4 : MPZEGGMAN_EXTENDBALLOONS42private alias 5 : MPZEGGMAN_RETRACTBALLOONS_Y43private alias 6 : MPZEGGMAN_RETRACTBALLOONS_X44private alias 7 : MPZEGGMAN_EXTENDBALLOONS2_Y45private alias 8 : MPZEGGMAN_WAITFORPOPPED46private alias 9 : MPZEGGMAN_RETURNTOMOVING47private alias 10 : MPZEGGMAN_MOVETOLASERPOS48private alias 11 : MPZEGGMAN_FIRINGLASERS49private alias 12 : MPZEGGMAN_SWAPLASERDIR50private alias 13 : MPZEGGMAN_EXPLODE51private alias 14 : MPZEGGMAN_DEFEATFALL52private alias 15 : MPZEGGMAN_DEFEATRISE53private alias 16 : MPZEGGMAN_FLEE54private alias 17 : MPZEGGMAN_ESCAPE5556// Eggman Animations57private alias 0 : MPZEGGANI_INVISIBLE58private alias 1 : MPZEGGANI_IDLE59private alias 2 : MPZEGGANI_LAUGH60private alias 3 : MPZEGGANI_HIT61private alias 4 : MPZEGGANI_DEFEATED62private alias 5 : MPZEGGANI_TOASTED63private alias 6 : MPZEGGANI_PANIC6465// Flame Animations66private alias 0 : FLAME_INACTIVE67private alias 1 : FLAME_ACTIVE68private alias 2 : FLAME_EXPLODE6970// EggmanBalloon Aliases71private alias object.value0 : mbzEggmanBalloon.parent7273// EggmanLaser Aliases74private alias object.value0 : mbzEggmanLaser.offset.x7576// Player Aliases77private alias object.xpos : player.xpos78private alias object.xvel : player.xvel79private alias object.speed : player.speed80private alias object.animation : player.animation81private alias object.collisionRight : player.collisionRight8283private alias object.value40 : player.hitboxLeft84private alias object.value38 : player.hitboxTop85private alias object.value41 : player.hitboxRight86private alias object.value39 : player.hitboxBottom8788// Music Events89private alias 26 : SLOT_MUSICEVENT_BOSS9091private alias 0 : MUSICEVENT_FADETOBOSS92private alias 1 : MUSICEVENT_FADETOSTAGE939495// ========================96// Function Declarations97// ========================9899reserve function MPZEggman_Oscillate100reserve function MPZEggman_HandleFireLaser101102103// ========================104// Static Values105// ========================106107private value MPZEggman_laserType = 0108109110// ========================111// Tables112// ========================113114private table MPZEggman_flameAnim1Table1158, 9, 9, 8, 8, 17116end table117118private table MPZEggman_balloonReleaseTable1190, 2, 4, 6, 1, 3, 5120end table121122123// ========================124// Function Definitions125// ========================126127private function MPZEggman_Oscillate128object.ypos = object.originPos.y129Sin256(temp0, object.oscillationAngle)130temp0 <<= 9131object.ypos += temp0132object.oscillationAngle += 4133object.oscillationAngle &= 0xFF134end function135136137private function MPZEggman_HandleFireLaser138object.laserDelay--139if object.laserDelay == 0140if object.laserID > 0141PlaySfx(SfxName[Small Laser], false)142object.laserDelay = 30143object.timer = 16144145arrayPos0 = object.entityPos146arrayPos0 += 8147arrayPos0 += object.laserID148ResetObjectEntity(arrayPos0, MPZEggman_laserType, 0, object.xpos, object.ypos)149object[arrayPos0].direction = object.direction150object[arrayPos0].xvel = object.moveVel151object[arrayPos0].xvel <<= 2152if object.direction == FLIP_NONE153FlipSign(object[arrayPos0].xvel)154object[arrayPos0].xpos += 0x40000155else156object[arrayPos0].xpos -= 0x40000157end if158mbzEggmanLaser[arrayPos0].offset.x = object[arrayPos0].xpos159mbzEggmanLaser[arrayPos0].offset.x &= 0xFFFF0000160object[arrayPos0].ypos += 0x70000161object.laserID--162end if163end if164end function165166167// ========================168// Events169// ========================170171event ObjectUpdate172switch object.state173case MPZEGGMAN_AWAITPLAYER174temp0 = object.ixpos175temp0 -= screen.xcenter176stage.newXBoundary1 = temp0177178temp0 = object.ixpos179temp0 += screen.xcenter180stage.newXBoundary2 = temp0181182temp0 = object.iypos183temp0 += 72184stage.newYBoundary2 = temp0185186if player[0].xpos >= object.xpos187object.animation = MPZEGGANI_IDLE188189ResetObjectEntity(SLOT_MUSICEVENT_BOSS, TypeName[Music Event], MUSICEVENT_FADETOBOSS, 0, 0)190object[SLOT_MUSICEVENT_BOSS].priority = PRIORITY_ACTIVE191192object.moveVel = 0x10000193object.moveVel *= screen.xcenter194object.moveVel /= 160195196object.boundsExtend.x = 0x200000197object.boundsExtend.x *= screen.xcenter198object.boundsExtend.x /= 160199200object.oscillationAngle = 128201object.flameAnim = FLAME_ACTIVE202203object.boundsL = stage.newXBoundary1204object.boundsL += 32205object.boundsL <<= 16206207object.boundsR = stage.newXBoundary2208object.boundsR -= 32209object.boundsR <<= 16210211arrayPos0 = object.entityPos212arrayPos1 = arrayPos0213arrayPos1 += 7214temp0 = 36215while arrayPos0 < arrayPos1216arrayPos0++217object[arrayPos0].type = TypeName[Eggman Balloon]218mbzEggmanBalloon[arrayPos0].parent = object.entityPos219object[arrayPos0].angle = temp0220if temp0 >= 0x80221object[arrayPos0].drawOrder = 2222end if223object[arrayPos0].priority = PRIORITY_ACTIVE224temp0 += 36225loop226227object.balloonRadius.x = 39228object.balloonRadius.y = 39229object.targetPos.x = object.xpos230object.moveBoundsB = object.ypos231object.moveBoundsB -= 0x300000232object.boundsT = object.ypos233object.boundsT -= 0x800000234object.boundsB = object.ypos235236object.ypos -= 0x1200000237object.originPos.y = object.ypos238object.timer = 0239240#platform: USE_STANDALONE241object.health = 8242#endplatform243#platform: USE_ORIGINS244if game.bossOneLife == false245object.health = 8246else247object.health = 1248end if249#endplatform250251object.priority = PRIORITY_ACTIVE252object.state = MPZEGGMAN_HOVER253end if254break255256case MPZEGGMAN_HOVER257object.originPos.y += 0x10000258if object.originPos.y >= object.boundsB259object.xvel = object.moveVel260if player[0].xpos < object.xpos261object.direction = FLIP_NONE262FlipSign(object.xvel)263else264object.direction = FLIP_X265end if266object.timer = 2267object.state = MPZEGGMAN_MOVEX268end if269CallFunction(MPZEggman_Oscillate)270break271272case MPZEGGMAN_MOVEX273object.xpos += object.xvel274275temp0 = false276if object.direction == FLIP_NONE277if object.xpos <= object.boundsL278temp0 = true279end if280else281if object.xpos >= object.boundsR282temp0 = true283end if284end if285286if temp0 == true287FlipSign(object.xvel)288object.direction ^= FLIP_X289290object.timer--291if object.timer == 0292object.xvel = object.moveVel293if object.direction == FLIP_NONE294FlipSign(object.xvel)295end if296object.yvel = -0x10000297object.state = MPZEGGMAN_MOVEXY298end if299end if300CallFunction(MPZEggman_Oscillate)301break302303case MPZEGGMAN_MOVEXY304object.xpos += object.xvel305object.originPos.y += object.yvel306307if object.originPos.y <= object.moveBoundsB308object.yvel = 0309end if310311if object.direction == FLIP_NONE312if object.xpos <= object.targetPos.x313temp0 = true314end if315else316if object.xpos >= object.targetPos.x317temp0 = true318end if319end if320321if temp0 == true322object.xvel = 0323object.xpos = object.targetPos.x324object.state = MPZEGGMAN_EXTENDBALLOONS325end if326CallFunction(MPZEggman_Oscillate)327break328329case MPZEGGMAN_EXTENDBALLOONS330object.balloonRadius.x++331object.balloonRadius.y++332333if object.balloonRadius.x >= 104334object.state = MPZEGGMAN_RETRACTBALLOONS_Y335end if336CallFunction(MPZEggman_Oscillate)337break338339case MPZEGGMAN_RETRACTBALLOONS_Y340object.balloonRadius.y--341if object.balloonRadius.y <= 0342object.state = MPZEGGMAN_RETRACTBALLOONS_X343end if344345CallFunction(MPZEggman_Oscillate)346break347348case MPZEGGMAN_RETRACTBALLOONS_X349object.balloonRadius.x--350if object.balloonRadius.x <= 39351object.state = MPZEGGMAN_EXTENDBALLOONS2_Y352end if353CallFunction(MPZEggman_Oscillate)354break355356case MPZEGGMAN_EXTENDBALLOONS2_Y357object.balloonRadius.y++358if object.balloonRadius.y >= 39359object.state = MPZEGGMAN_HOVER360end if361CallFunction(MPZEggman_Oscillate)362break363364case MPZEGGMAN_WAITFORPOPPED365object.originPos.y += object.yvel366367if object.originPos.y <= object.boundsT368object.yvel = 0369end if370371if object.balloonRadius.x > 39372object.balloonRadius.x--373end if374375if object.balloonRadius.y > 0376object.balloonRadius.y--377else378if object.balloonOffset.y < 0x100000379object.balloonOffset.y += 0x8000380end if381end if382383if object.activeBalloons == 0384if object.health > 1385object.state = MPZEGGMAN_RETURNTOMOVING386else387object.yvel = -0x18000388object.xvel = object.moveVel389if object.direction == FLIP_NONE390FlipSign(object.xvel)391end if392object.state = MPZEGGMAN_MOVETOLASERPOS393end if394end if395396CallFunction(MPZEggman_Oscillate)397break398399case MPZEGGMAN_RETURNTOMOVING400object.balloonOffset.y -= 0x8000401if object.balloonOffset.y <= 0402object.balloonOffset.y = 0403object.state = MPZEGGMAN_EXTENDBALLOONS2_Y404end if405CallFunction(MPZEggman_Oscillate)406break407408case MPZEGGMAN_MOVETOLASERPOS409if object.timer == 0410object.xpos += object.xvel411412object.originPos.y += object.yvel413if object.originPos.y <= object.boundsT414object.yvel = 0415end if416417if object.direction == FLIP_NONE418temp0 = object.boundsL419temp0 += object.boundsExtend.x420if object.xpos <= temp0421object.yvel = 0x18000422object.laserID = 3423object.laserDelay = 30424object.direction = FLIP_X425object.state = MPZEGGMAN_FIRINGLASERS426end if427else428temp0 = object.boundsR429temp0 -= object.boundsExtend.x430if object.xpos >= temp0431object.yvel = 0x18000432object.laserID = 3433object.laserDelay = 30434object.direction = FLIP_NONE435object.state = MPZEGGMAN_FIRINGLASERS436end if437end if438439CallFunction(MPZEggman_Oscillate)440CallFunction(MPZEggman_HandleFireLaser)441else442object.timer--443end if444break445446case MPZEGGMAN_FIRINGLASERS447if object.timer == 0448object.xpos += object.xvel449object.originPos.y += object.yvel450451if object.originPos.y >= object.boundsB452object.yvel = -0x18000453object.state = MPZEGGMAN_SWAPLASERDIR454end if455456if object.direction == FLIP_NONE457if object.xpos >= object.boundsR458object.xvel = 0459end if460else461if object.xpos <= object.boundsL462object.xvel = 0463end if464end if465466CallFunction(MPZEggman_Oscillate)467CallFunction(MPZEggman_HandleFireLaser)468else469object.timer--470end if471break472473case MPZEGGMAN_SWAPLASERDIR474if object.timer == 0475object.xpos += object.xvel476object.originPos.y += object.yvel477478temp0 = object.boundsB479temp0 -= 0x300000480if object.originPos.y <= temp0481object.xvel = object.moveVel482if object.direction == FLIP_NONE483FlipSign(object.xvel)484end if485end if486487if object.originPos.y <= object.boundsT488object.yvel = 0489object.state = MPZEGGMAN_MOVETOLASERPOS490end if491CallFunction(MPZEggman_Oscillate)492CallFunction(MPZEggman_HandleFireLaser)493else494object.timer--495end if496break497498case MPZEGGMAN_EXPLODE499object.timer++500if object.timer == 180501object.timer = 0502object.animation = MPZEGGANI_TOASTED503object.exploding = false504object.state++505ResetObjectEntity(SLOT_MUSICEVENT_BOSS, TypeName[Music Event], MUSICEVENT_FADETOSTAGE, 0, 0)506object[SLOT_MUSICEVENT_BOSS].priority = PRIORITY_ACTIVE507508temp0 = tileLayer[0].xsize509temp0 <<= 7510stage.newXBoundary2 = temp0511end if512break513514case MPZEGGMAN_DEFEATFALL515object.ypos += object.yvel516object.yvel += 0x1800517518object.timer++519if object.timer == 15520object.yvel = 0521object.timer = 0522object.animationTimer = 0523object.state++524end if525break526527case MPZEGGMAN_DEFEATRISE528if object.timer < 48529object.ypos += object.yvel530object.yvel -= 0x800531object.timer++532else533object.timer = 0534object.yvel = 0535object.originPos.y = object.ypos536object.state++537end if538break539540case MPZEGGMAN_FLEE541object.ypos = object.originPos.y542CallFunction(MPZEggman_Oscillate)543if object.timer < 8544object.timer++545else546object.timer = 0547object.animation = MPZEGGANI_PANIC548object.animationTimer = 0549object.flameAnim = FLAME_EXPLODE550object.flameAnimTimer = 0551object.direction = FLIP_X552object.priority = PRIORITY_ACTIVE553554#platform: USE_STANDALONE555temp0 = tileLayer[0].xsize556temp0 <<= 7557stage.newXBoundary2 = temp0558#endplatform559560object.state++561end if562break563564case MPZEGGMAN_ESCAPE565object.xpos += 0x40000566object.originPos.y -= 0x4000567CallFunction(MPZEggman_Oscillate)568if object.outOfBounds == true569object.type = TypeName[Blank Object]570end if571break572573end switch574575if object.health != 0576if object.invincibilityTimer > 0577object.invincibilityTimer--578GetBit(temp0, object.invincibilityTimer, 0)579if temp0 == true580SetPaletteEntry(0, 192, 0xE0E0E0)581else582SetPaletteEntry(0, 192, 0x000000)583end if584end if585586foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)587if object.invincibilityTimer == 0588CheckEqual(player[currentPlayer].animation, ANI_HURT)589temp0 = checkResult590CheckEqual(player[currentPlayer].animation, ANI_DYING)591temp0 |= checkResult592CheckEqual(player[currentPlayer].animation, ANI_DROWNING)593temp0 |= checkResult594if temp0 != 0595if object.animation != MPZEGGANI_LAUGH596object.animation = MPZEGGANI_LAUGH597object.animationTimer = 0598end if599end if600601BoxCollisionTest(C_TOUCH, object.entityPos, -24, -24, 24, 22, currentPlayer, player[currentPlayer].hitboxLeft, player[currentPlayer].hitboxTop, player[currentPlayer].hitboxRight, player[currentPlayer].hitboxBottom)602if checkResult == true603CallFunction(Player_CheckHit)604if checkResult == true605object.health--606if object.health == 0607#platform: USE_ORIGINS608CallNativeFunction2(NotifyCallback, NOTIFY_KILL_BOSS, 0)609CallNativeFunction2(NotifyCallback, NOTIFY_BOSS_END, 1)610#endplatform611612player.score += 1000613object.flameAnim = FLAME_INACTIVE614object.flameAnimTimer = 0615object.animation = MPZEGGANI_DEFEATED616object.animationTimer = 0617object.exploding = true618object.originPos.y = object.ypos619object.state = MPZEGGMAN_EXPLODE620object.timer = 0621#platform: USE_ORIGINS622object.invincibilityTimer = 64623#endplatform624else625temp0 = 7626temp0 -= object.health627628GetTableValue(arrayPos0, temp0, MPZEggman_balloonReleaseTable)629arrayPos0 += object.entityPos630arrayPos0++631object[arrayPos0].state++632if player[0].xpos < object[arrayPos0].xpos633object[arrayPos0].xvel = -0x8000634object[arrayPos0].direction = FLIP_NONE635else636object[arrayPos0].xvel = 0x8000637object[arrayPos0].direction = FLIP_X638end if639object[arrayPos0].yvel = -0x40000640object[arrayPos0].priority = PRIORITY_ACTIVE641642object.activeBalloons++643object.xvel = 0644object.yvel = -0x18000645object.state = MPZEGGMAN_WAITFORPOPPED646object.animation = MPZEGGANI_HIT647object.animationTimer = 0648object.invincibilityTimer = 64649PlaySfx(SfxName[Boss Hit], false)650end if651end if652end if653end if654next655end if656657// Right Bounds658if object.state != MPZEGGMAN_ESCAPE659foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)660temp0 = player[currentPlayer].collisionRight661temp0 <<= 16662temp0 += player[currentPlayer].xpos663temp1 = stage.curXBoundary2664temp1 <<= 16665if temp0 > temp1666player[currentPlayer].xvel = 0667player[currentPlayer].speed = 0668player[currentPlayer].xpos = temp1669temp0 = player[currentPlayer].collisionRight670temp0 <<= 16671player[currentPlayer].xpos -= temp0672end if673next674end if675676if object.exploding != false677temp0 = oscillation678temp0 &= 7679if temp0 == 0680Rand(temp0, 48)681temp0 -= 24682temp0 <<= 16683temp0 += object.xpos684685Rand(temp1, 48)686temp1 -= 24687temp1 <<= 16688temp1 += object.ypos689690CreateTempObject(TypeName[Explosion], 0, temp0, temp1)691object[tempObjectPos].drawOrder = 5692PlaySfx(SfxName[Explosion], false)693end if694end if695end event696697698event ObjectDraw699switch object.animation700default701case MPZEGGANI_INVISIBLE702break703704case MPZEGGANI_IDLE705temp0 = object.animationTimer706temp0 >>= 3707object.animationTimer++708object.animationTimer &= 15709DrawSpriteFX(temp0, FX_FLIP, object.xpos, object.ypos)710break711712case MPZEGGANI_LAUGH713temp0 = object.animationTimer714temp0 &= 15715temp0 >>= 3716temp0 += 2717object.animationTimer++718if object.animationTimer == 50719object.animationTimer = 0720if player[0].animation != ANI_DYING721object.animation = MPZEGGANI_IDLE722end if723end if724DrawSpriteFX(temp0, FX_FLIP, object.xpos, object.ypos)725break726727case MPZEGGANI_HIT728temp0 = object.animationTimer729temp0 &= 1730temp0 += 2731object.animationTimer++732if object.animationTimer == 50733object.animationTimer = 0734object.animation = MPZEGGANI_IDLE735end if736DrawSpriteFX(4, FX_FLIP, object.xpos, object.ypos)737break738739case MPZEGGANI_DEFEATED740temp0 = object.animationTimer741temp0 >>= 5742temp0 += 4743temp0 %= 5744object.animationTimer++745object.animationTimer &= 63746DrawSpriteFX(temp0, FX_FLIP, object.xpos, object.ypos)747break748749case MPZEGGANI_TOASTED750DrawSpriteFX(5, FX_FLIP, object.xpos, object.ypos)751break752753case MPZEGGANI_PANIC754temp0 = object.animationTimer755temp0 >>= 3756object.animationTimer++757object.animationTimer &= 15758DrawSpriteFX(temp0, FX_FLIP, object.xpos, object.ypos)759760temp0 = object.animationTimer761temp0 >>= 2762temp0 &= 1763if temp0 == 1764DrawSpriteFX(16, FX_FLIP, object.xpos, object.ypos)765end if766break767768end switch769770if object.animation > MPZEGGANI_INVISIBLE771DrawSpriteFX(6, FX_FLIP, object.xpos, object.ypos)772DrawSpriteFX(7, FX_FLIP, object.xpos, object.ypos)773end if774775switch object.flameAnim776default777case FLAME_INACTIVE778break779780case FLAME_ACTIVE781GetTableValue(temp0, object.flameAnimTimer, MPZEggman_flameAnim1Table)782object.flameAnimTimer++783if object.flameAnimTimer == 6784object.flameAnimTimer = 0785end if786787DrawSpriteFX(temp0, FX_FLIP, object.xpos, object.ypos)788break789790case FLAME_EXPLODE791temp0 = object.flameAnimTimer792temp0 /= 3793temp0 += 10794object.flameAnimTimer++795if object.flameAnimTimer >= 18796object.flameAnimTimer = 0797temp0 = 8798object.flameAnim = FLAME_ACTIVE799end if800DrawSpriteFX(temp0, FX_FLIP, object.xpos, object.ypos)801break802803end switch804end event805806807event ObjectStartup808CheckCurrentStageFolder("Zone09")809if checkResult == true810LoadSpriteSheet("MPZ/Objects.gif")811SpriteFrame(-28, -24, 44, 16, 195, 151) // Eggman Idle - Frame 1 - #0812SpriteFrame(-28, -24, 44, 16, 195, 168) // Eggman Idle - Frame 2 - #1813SpriteFrame(-28, -24, 44, 16, 240, 155) // Eggman Laugh - Frame 1 - #2814SpriteFrame(-28, -24, 44, 16, 240, 172) // Eggman Laugh - Frame 2 - #3815SpriteFrame(-28, -24, 44, 16, 285, 157) // Eggman Hit - #4816SpriteFrame(-28, -24, 44, 16, 285, 174) // Eggman Destroyed - #5817SpriteFrame(-24, -28, 56, 49, 220, 206) // EggMobile - #6818SpriteFrame(-32, -8, 8, 23, 190, 69) // Laser Cannon - #7819SpriteFrame(31, 4, 12, 8, 289, 125) // Flame Active - Frame 1 - #8820SpriteFrame(30, 2, 14, 12, 302, 125) // Flame Active - Frame 2 - #9821SpriteFrame(31, -2, 22, 14, 285, 192) // Flame Active - Frame 3 - #10822SpriteFrame(31, -9, 32, 26, 67, 75) // Flame Active - Frame 4 - #11823SpriteFrame(31, -2, 22, 14, 285, 192) // Flame Explode - Frame 1 - #12824SpriteFrame(31, -9, 32, 26, 67, 75) // Flame Explode - Frame 2 - #13825SpriteFrame(31, 4, 12, 8, 289, 125) // Flame Explode - Frame 3 - #14826SpriteFrame(30, 2, 14, 12, 302, 125) // Flame Explode - Frame 4 - #15827SpriteFrame(-3, -28, 11, 8, 332, 144) // Panic Sweat - Frame 1 - #16828SpriteFrame(0, 0, 1, 1, 332, 144) // Panic Sweat - Frame 2 - #17829830MPZEggman_laserType = TypeName[Eggman Laser]831832// But, MPZ isn't even in 2PVS...833if options.vsMode == true834foreach (TypeName[Eggman], arrayPos0, ALL_ENTITIES)835object[arrayPos0].type = TypeName[Blank Object]836next837end if838else839LoadSpriteSheet("MBZ/Objects.gif")840SpriteFrame(-28, -28, 60, 20, 1, 1) // Eggman Idle - Frame 1 - #0841SpriteFrame(-28, -28, 60, 20, 62, 1) // Eggman Idle - Frame 2 - #1842SpriteFrame(-28, -28, 60, 20, 1, 22) // Eggman Laugh - Frame 1 - #2843SpriteFrame(-28, -28, 60, 20, 62, 22) // Eggman Laugh - Frame 2 - #3844SpriteFrame(-28, -28, 60, 20, 1, 43) // Eggman Hit - #4845SpriteFrame(-28, -28, 60, 20, 62, 43) // Eggman Destroyed - #5846SpriteFrame(-24, -28, 56, 49, 255, 206) // EggMobile - #6847SpriteFrame(-32, -8, 8, 23, 316, 232) // Laser Cannon - #7848SpriteFrame(31, 4, 12, 8, 57, 90) // Flame Active - Frame 1 - #8849SpriteFrame(30, 2, 14, 12, 57, 99) // Flame Active - Frame 2 - #9850SpriteFrame(31, -2, 22, 14, 34, 97) // Flame Active - Frame 3 - #10851SpriteFrame(31, -9, 32, 26, 72, 86) // Flame Active - Frame 4 - #11852SpriteFrame(31, -2, 22, 14, 34, 97) // Flame Explode - Frame 1 - #12853SpriteFrame(31, -9, 32, 26, 72, 86) // Flame Explode - Frame 2 - #13854SpriteFrame(31, 4, 12, 8, 57, 90) // Flame Explode - Frame 3 - #14855SpriteFrame(30, 2, 14, 12, 57, 99) // Flame Explode - Frame 4 - #15856SpriteFrame(-3, -28, 11, 8, 45, 88) // Panic Sweat - Frame 1 - #16857SpriteFrame(0, 0, 0, 0, 7, 2) // Panic Sweat - Frame 2 - #17858859MPZEggman_laserType = TypeName[Eggman Laser 2]860end if861end event862863864// ========================865// Editor Events866// ========================867868event RSDKDraw869DrawSprite(0)870DrawSprite(6)871DrawSprite(7)872end event873874875event RSDKLoad876CheckCurrentStageFolder("Zone09")877if checkResult == true878LoadSpriteSheet("MPZ/Objects.gif")879SpriteFrame(-28, -24, 44, 16, 195, 151) // Eggman Idle - Frame 1 - #0880SpriteFrame(-28, -24, 44, 16, 195, 168) // Eggman Idle - Frame 2 - #1881SpriteFrame(-28, -24, 44, 16, 240, 155) // Eggman Laugh - Frame 1 - #2882SpriteFrame(-28, -24, 44, 16, 240, 172) // Eggman Laugh - Frame 2 - #3883SpriteFrame(-28, -24, 44, 16, 285, 157) // Eggman Hit - #4884SpriteFrame(-28, -24, 44, 16, 285, 174) // Eggman Destroyed - #5885SpriteFrame(-24, -28, 56, 49, 220, 206) // EggMobile - #6886SpriteFrame(-32, -8, 8, 23, 190, 69) // Laser Cannon - #7887SpriteFrame(31, 4, 12, 8, 289, 125) // Flame Active - Frame 1 - #8888SpriteFrame(30, 2, 14, 12, 302, 125) // Flame Active - Frame 2 - #9889SpriteFrame(31, -2, 22, 14, 285, 192) // Flame Active - Frame 3 - #10890SpriteFrame(31, -9, 32, 26, 67, 75) // Flame Active - Frame 4 - #11891SpriteFrame(31, -2, 22, 14, 285, 192) // Flame Explode - Frame 1 - #12892SpriteFrame(31, -9, 32, 26, 67, 75) // Flame Explode - Frame 2 - #13893SpriteFrame(31, 4, 12, 8, 289, 125) // Flame Explode - Frame 3 - #14894SpriteFrame(30, 2, 14, 12, 302, 125) // Flame Explode - Frame 4 - #15895SpriteFrame(-3, -28, 11, 8, 332, 144) // Panic Sweat - Frame 1 - #16896SpriteFrame(0, 0, 1, 1, 332, 144) // Panic Sweat - Frame 2 - #17897else898LoadSpriteSheet("MBZ/Objects.gif")899SpriteFrame(-28, -28, 60, 20, 1, 1) // Eggman Idle - Frame 1 - #0900SpriteFrame(-28, -28, 60, 20, 62, 1) // Eggman Idle - Frame 2 - #1901SpriteFrame(-28, -28, 60, 20, 1, 22) // Eggman Laugh - Frame 1 - #2902SpriteFrame(-28, -28, 60, 20, 62, 22) // Eggman Laugh - Frame 2 - #3903SpriteFrame(-28, -28, 60, 20, 1, 43) // Eggman Hit - #4904SpriteFrame(-28, -28, 60, 20, 62, 43) // Eggman Destroyed - #5905SpriteFrame(-24, -28, 56, 49, 255, 206) // EggMobile - #6906SpriteFrame(-32, -8, 8, 23, 316, 232) // Laser Cannon - #7907SpriteFrame(31, 4, 12, 8, 57, 90) // Flame Active - Frame 1 - #8908SpriteFrame(30, 2, 14, 12, 57, 99) // Flame Active - Frame 2 - #9909SpriteFrame(31, -2, 22, 14, 34, 97) // Flame Active - Frame 3 - #10910SpriteFrame(31, -9, 32, 26, 72, 86) // Flame Active - Frame 4 - #11911SpriteFrame(31, -2, 22, 14, 34, 97) // Flame Explode - Frame 1 - #12912SpriteFrame(31, -9, 32, 26, 72, 86) // Flame Explode - Frame 2 - #13913SpriteFrame(31, 4, 12, 8, 57, 90) // Flame Explode - Frame 3 - #14914SpriteFrame(30, 2, 14, 12, 57, 99) // Flame Explode - Frame 4 - #15915SpriteFrame(-3, -28, 11, 8, 45, 88) // Panic Sweat - Frame 1 - #16916SpriteFrame(0, 0, 0, 0, 7, 2) // Panic Sweat - Frame 2 - #17917end if918919SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")920end event921922923