Path: blob/master/Sonic 1/Scripts/Global/Goggles.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Goggles Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.state : object.setupDone1213private alias object.value0 : object.targetPlayer14private alias object.value1 : object.frameTable1516// Player Aliases17private alias object.type : player.type18private alias object.animation : player.animation19private alias object.direction : player.direction20private alias object.rotation : player.rotation21private alias object.xpos : player.xpos22private alias object.ypos : player.ypos23private alias object.frame : player.frame2425private alias -1 : DRAWORDER_PLAYER262728// ========================29// Tables30// ========================3132private table Goggles_frameTableSonic331 // ANI_STOPPED342 // ANI_WAITING350 // ANI_BORED (blank)368 // ANI_LOOKINGUP3711 // ANI_LOOKINGDOWN3814 // ANI_WALKING3920 // ANI_RUNNING4024 // ANI_SKIDDING410 // ANI_PEELOUT - even if there's logic for it in other places, it's blank here420 // ANI_SPINDASH4326 // ANI_JUMPING4431 // ANI_BOUNCING4532 // ANI_HURT, can't be seen if the Goggles were given Debug Mode but can be seen if the Goggles are in visual-only mode (see Startup)460 // ANI_DYING470 // ANI_DROWNING4834 // ANI_FANROTATE4939 // ANI_BREATHING5040 // ANI_PUSHING5144 // ANI_FLAILING15244 // ANI_FLAILING2530 // "Sliding" - blank and unused5446 // ANI_HANGING550 // ANI_DROPPING5648 // ANI_CLINGING570 // ANI_FLYING580 // ANI_FLYINGTIRED590 // ANI_SWIMMING600 // ANI_SWIMMINGTIRED610 // ANI_GLIDING620 // ANI_GLIDING_DROP630 // ANI_GLIDING_STOP640 // ANI_CLIMBING650 // ANI_LEDGEPULLUP660 // "Corkscrew H" - blank and unused670 // "Corkscrew V" - blank and unused6832 // ANI_WATERSLIDE690 // ANI_CONTINUE700 // ANI_CONTINUE_UP710 // ANI_SUPER_TRANSFORM720 // ANI_FLY_LIFT_DOWN730 // ANI_FLY_LIFT_UP740 // ANI_FLY_LIFT_TIRED750 // ANI_SWIM_LIFT76end table777879private table Goggles_frameTableTails8050 // ANI_STOPPED8151 // ANI_WAITING820 // ANI_BORED (blank)8354 // ANI_LOOKINGUP8455 // ANI_LOOKINGDOWN8556 // ANI_WALKING8664 // ANI_RUNNING8768 // ANI_SKIDDING8864 // ANI_PEELOUT - used it's not really Tails's "Peel Out", actually his fastest run anim890 // ANI_SPINDASH900 // ANI_JUMPING9170 // ANI_BOUNCING9272 // ANI_HURT, not seen if Goggles are from Debug Mode but can be seen if Goggles are only visual (see Startup)930 // ANI_DYING940 // ANI_DROWNING9574 // ANI_FANROTATE9679 // ANI_BREATHING9780 // ANI_PUSHING9884 // ANI_FLAILING19984 // ANI_FLAILING21000 // "Sliding" - blank and unused1010 // ANI_HANGING1020 // ANI_DROPPING10386 // ANI_CLINGING10488 // ANI_FLYING - unused because Tails is always swimming underwater. This data for it still fits fine though10590 // ANI_FLYINGTIRED - unused for the same reason as above, this one also works fine10692 // ANI_SWIMMING10797 // ANI_SWIMMINGTIRED1080 // ANI_GLIDING1090 // ANI_GLIDING_DROP1100 // ANI_GLIDING_STOP1110 // ANI_CLIMBING1120 // ANI_LEDGEPULLUP1130 // "Corkscrew H" - blank and unused1140 // "Corkscrew V" - blank and unused11572 // ANI_WATERSLIDE1160 // ANI_CONTINUE1170 // ANI_CONTINUE_UP1180 // ANI_SUPER_TRANSFORM1190 // ANI_FLY_LIFT_DOWN1200 // ANI_FLY_LIFT_UP1210 // ANI_FLY_LIFT_TIRED1220 // ANI_SWIM_LIFT123end table124125126private table Goggles_frameTableKnuckles127100 // ANI_STOPPED128101 // ANI_WAITING1290 // ANI_BORED (blank)130114 // ANI_LOOKINGUP131117 // ANI_LOOKINGDOWN132120 // ANI_WALKING133128 // ANI_RUNNING134132 // ANI_SKIDDING1350 // ANI_PEELOUT1360 // ANI_SPINDASH137134 // ANI_JUMPING138142 // ANI_BOUNCING139143 // ANI_HURT, as with the other characters this frame can't be seen if the Goggles were spawned via Debug Mode,140// but they can be seen if the Goggles were placed in the scene (once again, see Startup)1410 // ANI_DYING1420 // ANI_DROWNING143145 // ANI_FANROTATE144155 // ANI_BREATHING145156 // ANI_PUSHING146160 // ANI_FLAILING1147160 // ANI_FLAILING21480 // "Sliding" - blank and unused1490 // ANI_HANGING1500 // ANI_DROPPING151172 // ANI_CLINGING1520 // ANI_FLYING1530 // ANI_FLYINGTIRED1540 // ANI_SWIMMING1550 // ANI_SWIMMINGTIRED156174 // ANI_GLIDING157177 // ANI_GLIDING_DROP158179 // ANI_GLIDING_STOP159181 // ANI_CLIMBING160187 // ANI_LEDGEPULLUP1610 // "Corkscrew H" - blank and unused1620 // "Corkscrew V" - blank and unused163144 // ANI_WATERSLIDE1640 // ANI_CONTINUE1650 // ANI_CONTINUE_UP1660 // ANI_SUPER_TRANSFORM1670 // ANI_FLY_LIFT_DOWN1680 // ANI_FLY_LIFT_UP1690 // ANI_FLY_LIFT_TIRED1700 // ANI_SWIM_LIFT171end table172173174// ========================175// Events176// ========================177178event ObjectUpdate179// This object can't setup in Startup due to how it works, so setup is done on the first frame of its Update instead180if object.setupDone == false181switch stage.playerListPos182case PLAYER_SONIC_A183case PLAYER_SONIC_TAILS_A184object.frameTable = Goggles_frameTableSonic185break186187case PLAYER_TAILS_A188object.frameTable = Goggles_frameTableTails189break190191case PLAYER_KNUCKLES_A192object.frameTable = Goggles_frameTableKnuckles193break194195end switch196197object.setupDone++198end if199end event200201202event ObjectDraw203// Focus on the assigned player204currentPlayer = object.targetPlayer205206temp0 = player[currentPlayer].ypos207temp0 >>= 16208209// Only draw when the player is underwater210if temp0 >= stage.waterLevel211// Face the same way the player is facing212object.direction = player[currentPlayer].direction213214// Check if the player is in an animation that rotates215CheckEqual(player[currentPlayer].animation, ANI_WALKING)216temp0 = checkResult217CheckEqual(player[currentPlayer].animation, ANI_RUNNING)218temp0 |= checkResult219CheckEqual(player[currentPlayer].animation, ANI_PEELOUT) // For Tails, the "Peelout" anim is his fastest run anim220temp0 |= checkResult221if temp0 == true222// Player is in a rotatable animation, make the goggles match the player's quarter rotation223object.rotation = player[currentPlayer].rotation224225if object.rotation >= 256226object.rotation += 40227else228object.rotation += 16229end if230231object.rotation &= 448232else233// Player is an a normal, upright animation so keep the goggles unrotated234object.rotation = 0235end if236237// Get the starting frame the goggles should use238object.frame = player[currentPlayer].frame239GetTableValue(temp0, player[currentPlayer].animation, object.frameTable)240241if temp0 == 0242// Blank, that means this animation is one that shouldn't have goggles shown243object.frame = 0244else245object.frame += temp0246247// Special exceptions for some of the special sticklers248249if object.frameTable == Goggles_frameTableTails250if player[currentPlayer].animation == ANI_WAITING251if player[currentPlayer].frame <= 20252// Looking ahead253object.frame = 50254else255if player[currentPlayer].frame <= 36256// Looking at the camera257object.frame = 51258else259if player[currentPlayer].frame == 37260// First frame of yawning261object.frame = 52262else263if player[currentPlayer].frame == 48264// Last frame of yawning265object.frame = 52266else267// Mid-yawn268object.frame = 53269end if270end if271end if272end if273else274// Tails should never be flying underwater - he's swimming instead - so this following stuff somewhat goes unused275if player[currentPlayer].animation == ANI_FLYINGTIRED276// The player's animation has 12 frames while there are only two frames of goggle data for it, crunch them up a little277278object.frame = player[currentPlayer].frame279object.frame /= 6280object.frame += 90281end if282end if283else284if object.frameTable == Goggles_frameTableKnuckles285if player[currentPlayer].animation == ANI_WAITING286if player[currentPlayer].frame <= 53287// Tapping his foot288object.frame = 100289else290if player[currentPlayer].frame <= 58291// Looking at the camera292object.frame = 101293else294if player[currentPlayer].frame == 59295// First frame of the air boxing sequence296object.frame = 102297else298if player[currentPlayer].frame <= 91299// Boxing up, ready to go300// In this part of the animation, he's moving in groups of 3 repeated frames301object.frame = player[currentPlayer].frame302object.frame -= 60303object.frame &= 3304object.frame += 103305else306// Punching307object.frame = player[currentPlayer].frame308object.frame -= 92309object.frame += 107310end if311end if312end if313end if314else315CheckEqual(player[currentPlayer].animation, ANI_FLAILING1)316temp0 = checkResult317CheckEqual(player[currentPlayer].animation, ANI_FLAILING2)318temp0 |= checkResult319if temp0 == true320if player[currentPlayer].frame < 12321// In this part of the animation, all his frames are in groups of 2322object.frame = player[currentPlayer].frame323object.frame >>= 1324object.frame += 160325else326if player[currentPlayer].frame < 27327// The same frame is repeated 14 times328object.frame = 166329else330if player[currentPlayer].frame < 30331// Similarly, the next three frames are all the same sprite too332object.frame = 167333else334if player[currentPlayer].frame < 33335// And one more, another group of 3 dupes336object.frame = 168337else338// From here, all sprites are in groups of two once again339object.frame = player[currentPlayer].frame340object.frame -= 33341object.frame >>= 1342object.frame %= 3343object.frame += 169344end if345end if346end if347end if348end if349end if350end if351end if352end if353354if player[currentPlayer].type != TypeName[Debug Mode]355DrawSpriteFX(object.frame, FX_ROTATE, player[currentPlayer].xpos, player[currentPlayer].ypos)356end if357end if358end event359360361event ObjectStartup362LoadSpriteSheet("Global/Items.gif")363364// Goggle frames365// There are only a couple of actual goggle sprites, these are all pretty much the same thing but with different offsets366// All frames are labelled with the character and animation they correspond to367368// #0 - Empty frame369SpriteFrame(0, 0, 1, 1, 1, 1)370371// #1 - Sonic's ANI_STOPPED372SpriteFrame(-4, -12, 12, 9, 118, 71)373374// #2 - #7 - Sonic's ANI_WAITING375SpriteFrame(-7, -11, 15, 9, 118, 81)376SpriteFrame(-7, -11, 15, 9, 118, 81)377SpriteFrame(-7, -11, 15, 9, 118, 81)378SpriteFrame(-7, -11, 15, 9, 118, 81)379SpriteFrame(-7, -11, 15, 9, 118, 81)380SpriteFrame(-7, -11, 15, 9, 118, 81)381382// ANI_BORED has no goggle data383384// #8 - #10 - Sonic's ANI_LOOKINGUP385SpriteFrame(-4, -12, 12, 9, 118, 71)386SpriteFrame(-5, -12, 12, 10, 127, 102)387SpriteFrame(-6, -13, 12, 10, 127, 102)388389// #11 - #13 - Sonic's ANI_LOOKINGDOWN390SpriteFrame(-4, -12, 12, 9, 118, 71)391SpriteFrame(-1, -4, 14, 11, 150, 118)392SpriteFrame(-1, 10, 9, 8, 140, 102)393394// #14 - #19 - Sonic's ANI_WALKING395SpriteFrame(0, -11, 12, 9, 118, 71)396SpriteFrame(0, -12, 12, 9, 118, 71)397SpriteFrame(0, -11, 12, 9, 118, 71)398SpriteFrame(3, -11, 8, 9, 118, 102)399SpriteFrame(3, -12, 8, 9, 118, 102)400SpriteFrame(3, -11, 8, 9, 118, 102)401402// #20 - #23 - Sonic's ANI_RUNNING403SpriteFrame(3, -9, 12, 9, 118, 71)404SpriteFrame(3, -9, 12, 9, 118, 71)405SpriteFrame(3, -9, 12, 9, 118, 71)406SpriteFrame(3, -9, 12, 9, 118, 71)407408// #24 - #25 - Sonic's ANI_SKIDDING409SpriteFrame(-9, -9, 15, 9, 118, 81)410SpriteFrame(-9, -9, 15, 9, 118, 81)411412// Sonic's ANI_PEELOUT has no goggle data413// There is still some code for it, see ObjectDraw414415// Sonic's ANI_SPINDASH is blank as well416417// #26 - #30 - Sonic's ANI_JUMPING418SpriteFrame(0, 0, 1, 1, 1, 1)419SpriteFrame(3, -7, 8, 9, 118, 102)420SpriteFrame(-1, 3, 9, 8, 140, 102)421SpriteFrame(-11, -2, 8, 9, 142, 92)422SpriteFrame(-8, -11, 9, 8, 118, 123)423424// #31 - Sonic's ANI_BOUNCING425SpriteFrame(-4, -17, 12, 10, 127, 102)426427// #32 - #33 - Sonic's ANI_HURT and ANI_WATERSLIDE428SpriteFrame(-8, -10, 15, 9, 118, 81)429SpriteFrame(-8, -10, 15, 9, 118, 81)430431// Sonic's ANI_DYING and ANI_DROWNING are blank too432433// #34 - #38 - Sonic's ANI_FANROTATE434SpriteFrame(9, -5, 12, 9, 118, 71)435SpriteFrame(-8, -5, 16, 8, 118, 113)436SpriteFrame(-21, -5, 12, 9, 130, 92)437SpriteFrame(0, 0, 1, 1, 1, 1)438SpriteFrame(0, 0, 1, 1, 1, 1)439440// #39 - Sonic's ANI_BREATHING441SpriteFrame(-4, -18, 12, 10, 127, 102)442443// #40 - #43 - Sonic's ANI_PUSHING444SpriteFrame(-5, -7, 15, 9, 118, 81)445SpriteFrame(-5, -8, 15, 9, 118, 81)446SpriteFrame(-5, -7, 15, 9, 118, 81)447SpriteFrame(-5, -8, 15, 9, 118, 81)448449// #44 - #45 - Sonic's ANI_FLAILING1 and ANI_FLAILING2450SpriteFrame(-10, -13, 15, 9, 118, 81)451SpriteFrame(-8, -12, 15, 9, 118, 81)452453// "Sliding" anim doesn't have any data454455// #46 - #47 - Sonic's ANI_HANGING456SpriteFrame(-3, -9, 12, 9, 118, 71)457SpriteFrame(-3, -9, 12, 9, 118, 71)458459// Sonic's ANI_DROPPING doesn't have any goggle data either460461// #48 - #49 - Sonic's ANI_CLINGING462SpriteFrame(-13, -10, 14, 13, 135, 113)463SpriteFrame(-12, -10, 14, 13, 135, 113)464465// Now, Tails's frames466467// #50 - Tails's ANI_STOPPED468SpriteFrame(-6, -10, 12, 9, 118, 71)469470// #51 - #53 - Tails's ANI_WAITING471// Note that there's a special exception for this,472// go see ObjectDraw for more info473SpriteFrame(-9, -10, 16, 9, 118, 113)474SpriteFrame(-9, -10, 16, 9, 118, 113)475SpriteFrame(-8, -11, 16, 9, 118, 113)476477// Tails's ANI_BORED is empty478479// #54 - Tails's ANI_LOOKINGUP480SpriteFrame(-5, -12, 12, 9, 118, 71)481482// #55 - Tails's ANI_LOOKINGDOWN483SpriteFrame(-2, 1, 12, 9, 118, 71)484485// #56 - #63 - Tails's ANI_WALKING486SpriteFrame(1, -11, 8, 9, 118, 102)487SpriteFrame(-1, -13, 8, 9, 118, 102)488SpriteFrame(-1, -13, 8, 9, 118, 102)489SpriteFrame(-1, -12, 8, 9, 118, 102)490SpriteFrame(1, -11, 8, 9, 118, 102)491SpriteFrame(0, -13, 8, 9, 118, 102)492SpriteFrame(-1, -13, 8, 9, 118, 102)493SpriteFrame(-1, -11, 8, 9, 118, 102)494495// #64 - #67 - Tails's ANI_RUNNING and ANI_PEELOUT496// Note that Tails's ANI_PEELOUT is his fastest run anim497SpriteFrame(3, -11, 8, 9, 118, 102)498SpriteFrame(3, -11, 8, 9, 118, 102)499SpriteFrame(3, -11, 8, 9, 118, 102)500SpriteFrame(3, -11, 8, 9, 118, 102)501502// #68 - #69 - Tails's ANI_SKIDDING503SpriteFrame(-5, -11, 12, 9, 118, 71)504SpriteFrame(-5, -11, 12, 9, 118, 71)505506// #70 - #71 - Tails's ANI_BOUNCING507SpriteFrame(-2, -15, 9, 8, 118, 123)508SpriteFrame(-2, -15, 9, 8, 118, 123)509510// #72 - Tails's ANI_HURT and ANI_WATERSLIDE511SpriteFrame(-5, -10, 12, 9, 118, 71)512513// #73 - Appears to be unused..?514// This is around the spot where ANI_DYING and ANI_DROWNING are, if that's any indicator of a likely guess515SpriteFrame(-5, -10, 12, 9, 118, 71)516517// #74 - #78 - Tails's ANI_FANROTATE518SpriteFrame(4, -5, 12, 9, 118, 71)519SpriteFrame(-8, -5, 16, 8, 118, 113)520SpriteFrame(-15, -5, 12, 9, 130, 92)521SpriteFrame(0, 0, 1, 1, 1, 1)522SpriteFrame(0, 0, 1, 1, 1, 1)523524// #79 - Tails's ANI_BREATHING525SpriteFrame(-2, -15, 12, 10, 127, 102)526527// #80 - #83 - Tails's ANI_PUSHING528SpriteFrame(-5, -8, 15, 9, 118, 81)529SpriteFrame(-5, -8, 15, 9, 118, 81)530SpriteFrame(-5, -8, 15, 9, 118, 81)531SpriteFrame(-5, -8, 15, 9, 118, 81)532533// #84 - #85 - Tails's ANI_FLAILING1 and ANI_FLAILING2534SpriteFrame(-9, -10, 16, 9, 118, 113)535SpriteFrame(-9, -10, 16, 9, 118, 113)536537// #86 - #87 - Tails's ANI_CLINGING538SpriteFrame(-14, -9, 14, 13, 135, 113)539SpriteFrame(-13, -9, 14, 13, 135, 113)540541// #88 - #89 - Tails's ANI_FLYING542// Unused, since Tails doesn't fly underwater543SpriteFrame(-1, -4, 12, 9, 118, 71)544SpriteFrame(-1, -4, 12, 9, 118, 71)545546// #90 - #91 - Tails's ANI_FLYINGTIRED547// This animation has a special exceptions as well,548// go see ObjectDraw for more info549// In spite of that though, this one is unused too550SpriteFrame(-1, -4, 12, 9, 118, 71)551SpriteFrame(-1, -5, 12, 9, 118, 71)552553// #92 - #96 - Tails's ANI_SWIMMING554SpriteFrame(-1, -7, 12, 9, 118, 71)555SpriteFrame(-1, -7, 12, 9, 118, 71)556SpriteFrame(-1, -7, 12, 9, 118, 71)557SpriteFrame(-1, -7, 12, 9, 118, 71)558SpriteFrame(-1, -7, 12, 9, 118, 71)559560// #97 - #99 - Tails's ANI_SWIMMINGTIRED561SpriteFrame(1, -5, 12, 9, 118, 71)562SpriteFrame(1, -5, 12, 9, 118, 71)563SpriteFrame(1, -5, 12, 9, 118, 71)564565// #100 - Knuckles's ANI_STOPPED566SpriteFrame(-5, -17, 15, 9, 118, 81)567568// #101 - #113 - Knuckles's ANI_WAITING569// Note that there's also a special exception for this,570// go see ObjectDraw for more info571SpriteFrame(-6, -16, 15, 9, 118, 81)572SpriteFrame(-4, -17, 15, 9, 118, 81)573SpriteFrame(-5, -16, 15, 9, 118, 81)574SpriteFrame(-4, -16, 15, 9, 118, 81)575SpriteFrame(-3, -15, 15, 9, 118, 81)576SpriteFrame(-4, -15, 15, 9, 118, 81)577SpriteFrame(-5, -15, 15, 9, 118, 81)578SpriteFrame(-4, -15, 15, 9, 118, 81)579SpriteFrame(-5, -15, 15, 9, 118, 81)580SpriteFrame(-4, -15, 15, 9, 118, 81)581SpriteFrame(7, -15, 8, 9, 118, 102)582SpriteFrame(-5, -16, 15, 9, 118, 81)583SpriteFrame(-4, -17, 15, 9, 118, 81)584585// #114 - #116 - Knuckles's ANI_LOOKINGUP586SpriteFrame(-5, -17, 15, 9, 118, 81)587SpriteFrame(-5, -19, 12, 10, 127, 102)588SpriteFrame(-7, -20, 12, 10, 127, 102)589590// #117 - #119 - Knuckles's ANI_LOOKINGDOWN591SpriteFrame(-5, -17, 15, 9, 118, 81)592SpriteFrame(-3, -9, 12, 9, 118, 71)593SpriteFrame(-2, -1, 12, 9, 118, 71)594595// #120 - #127 - Knuckles's ANI_WALKING596SpriteFrame(-1, -11, 12, 9, 118, 71)597SpriteFrame(3, -12, 8, 9, 118, 102)598SpriteFrame(3, -14, 8, 9, 118, 102)599SpriteFrame(0, -12, 12, 9, 118, 71)600SpriteFrame(-3, -12, 12, 9, 118, 71)601SpriteFrame(-3, -13, 15, 9, 118, 81)602SpriteFrame(-4, -14, 15, 9, 118, 81)603SpriteFrame(-2, -13, 12, 9, 118, 71)604605// #128 - #131 - Knuckles's ANI_RUNNING606SpriteFrame(-3, -12, 12, 9, 118, 71)607SpriteFrame(-3, -12, 12, 9, 118, 71)608SpriteFrame(-3, -12, 12, 9, 118, 71)609SpriteFrame(-3, -12, 12, 9, 118, 71)610611// #132 - #133 - Knuckles's ANI_SKIDDING612// This one's a weird case - in the initial release of S1, Knuckles's skidding anim was two frames613// However, it later got changed to hold four, but this object was never updated to account for that614SpriteFrame(-5, -13, 15, 9, 118, 81)615SpriteFrame(-10, -12, 15, 9, 118, 81)616617// #134 - #141 - Knuckles's ANI_JUMPING618SpriteFrame(0, 0, 1, 1, 1, 1)619SpriteFrame(2, -11, 8, 9, 118, 102)620SpriteFrame(0, 0, 1, 1, 1, 1)621SpriteFrame(2, 1, 9, 8, 140, 102)622SpriteFrame(0, 0, 1, 1, 1, 1)623SpriteFrame(-10, 2, 8, 9, 142, 92)624SpriteFrame(0, 0, 1, 1, 1, 1)625SpriteFrame(-11, -10, 9, 8, 118, 123)626SpriteFrame(-6, -17, 9, 8, 118, 123)627SpriteFrame(-8, -16, 15, 9, 118, 81)628629// #142 - Knuckles's ANI_BOUNCING630SpriteFrame(-10, -13, 15, 9, 118, 81)631632// #143 - Knuckles's ANI_HURT and ANI_WATERSLIDE633SpriteFrame(2, -8, 12, 9, 118, 71)634635// #144 - Unused?636SpriteFrame(-2, -7, 15, 9, 118, 81)637638// #145 - #154 - Knuckles's ANI_FANROTATE639SpriteFrame(-7, -5, 16, 9, 118, 113)640SpriteFrame(-13, -7, 15, 9, 69, 106)641SpriteFrame(-14, -8, 12, 9, 130, 92)642SpriteFrame(-14, -9, 8, 9, 60, 106)643SpriteFrame(0, 0, 1, 1, 1, 1)644SpriteFrame(0, 0, 1, 1, 1, 1)645SpriteFrame(0, 0, 1, 1, 1, 1)646SpriteFrame(6, -9, 8, 9, 118, 102)647SpriteFrame(-3, -17, 15, 9, 118, 81)648SpriteFrame(1, -13, 12, 9, 118, 71)649650// #155 - Knuckles's ANI_BREATHING651SpriteFrame(-4, -14, 15, 9, 118, 81)652653// #156 - #159 - Knuckles's ANI_PUSHING654SpriteFrame(1, -13, 12, 9, 118, 71)655SpriteFrame(4, -14, 8, 9, 118, 102)656SpriteFrame(1, -10, 12, 9, 118, 71)657SpriteFrame(2, -15, 15, 9, 118, 81)658659// #160 - #171 - Knuckles's ANI_FLAILING1 and ANI_FLAILING2660// This animation is also one with special exceptions,661// go see ObjectDraw for more info662SpriteFrame(5, -12, 16, 9, 118, 113)663SpriteFrame(3, -26, 14, 13, 135, 113)664SpriteFrame(7, -16, 6, 7, 128, 123)665SpriteFrame(3, -16, 11, 10, 118, 91)666SpriteFrame(-1, -22, 14, 13, 135, 113)667SpriteFrame(4, -20, 14, 13, 135, 113)668SpriteFrame(6, -18, 14, 13, 135, 113)669SpriteFrame(5, -20, 14, 13, 135, 113)670SpriteFrame(3, -21, 14, 13, 135, 113)671SpriteFrame(3, -20, 14, 13, 135, 113)672SpriteFrame(-13, -11, 11, 10, 118, 91)673SpriteFrame(-12, -11, 11, 10, 118, 91)674675// #172 - #173 - Knuckles's ANI_CLINGING676SpriteFrame(-7, -5, 16, 9, 118, 113)677SpriteFrame(-2, -7, 15, 9, 118, 81)678679// #174 - #176 - Knuckles's ANI_GLIDING680SpriteFrame(2, -8, 12, 9, 118, 71)681SpriteFrame(2, -13, 12, 9, 118, 71)682SpriteFrame(0, -17, 12, 9, 118, 71)683684// #177 - #178 - Knuckles's ANI_GLIDING_DROP685SpriteFrame(3, -3, 12, 9, 118, 71)686SpriteFrame(-4, -6, 15, 9, 118, 81)687688// #179 - #180 - Knuckles's ANI_GLIDING_STOP689SpriteFrame(-12, -15, 12, 9, 118, 71)690SpriteFrame(-13, -15, 12, 9, 118, 71)691692// #181 - #186 - Knuckles's ANI_CLIMBING693SpriteFrame(-12, -16, 12, 9, 118, 71)694SpriteFrame(-12, -15, 12, 9, 118, 71)695SpriteFrame(-13, -15, 12, 9, 118, 71)696SpriteFrame(-12, -16, 12, 9, 118, 71)697SpriteFrame(-4, -20, 8, 9, 118, 102)698SpriteFrame(-3, -21, 8, 9, 118, 102)699700// #187 - Knuckles's ANI_LEDGEPULLUP701// This one seems to be incomplete, with only one frame702SpriteFrame(-8, -23, 15, 9, 118, 81)703704// Amy doesn't have any Goggles frames in Origins Plus, honestly I don't blame them for not bothering705706// Look for goggle objects placed in the current scene707foreach (TypeName[Goggles], arrayPos0, ALL_ENTITIES)708// Short explanation - placing goggles in a scene will allow Sonic to have goggles on start,709// but they won't function like normal goggles710// Instead, they'll be purely cosmetic, which means that Sonic can still get hit and stuff711// However, even if he does get hit, he'll still keep the goggles on712// This feature is another unused part of this already unused object,713// to utilise it just place a Goggles object anywhere in a scene714715// Move to the P1 shield object slot716arrayPos1 = playerCount717718// Move currentPlayer to P1 slot (? - nothing gets done with this, but currentPlayer *would* need to be set up if using Player_ApplyShield, maybe that's how it was in earlier versions?)719currentPlayer = 0720721// Place some goggles in the shield slot and init its values722ResetObjectEntity(arrayPos1, TypeName[Goggles], 0, 0, 0)723object[arrayPos1].priority = PRIORITY_ACTIVE724object[arrayPos1].targetPlayer = 0725object[arrayPos1].drawOrder = DRAWORDER_PLAYER726727// Remove the goggle object from the scene, as now it's been moved to the dedicated shield slot728ResetObjectEntity(arrayPos0, TypeName[Blank Object], 0, 0, 0)729next730731// Store the Goggle Type ID to the corresponding global variable732// (Even if the script is in the Global folder, it's not actually a global object - it's an LZ stage-specific object instead733// so because of that the Goggles don't even have a Type ID by default, since they don't really exist normally)734goggleType = TypeName[Goggles]735end event736737738// ========================739// Editor Events740// ========================741742event RSDKDraw743DrawSprite(0)744end event745746747event RSDKLoad748LoadSpriteSheet("Global/Items.gif")749SpriteFrame(-4, -12, 12, 9, 118, 71)750751SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")752end event753754755