Path: blob/main/Scripts/Mission/Bomb2.txt
1319 views
//----------------Sonic CD Semi Bomb 2 Script-----------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//3//-----------Used in Mission "M086 - Gotta Go Fast"-----------//45// Aliases6#alias Object.Value0 : Object.Timer7#alias Object.Value1 : Object.YVelocity89// States10#alias 0 : BOMB2_FALLING11#alias 1 : BOMB2_TICKING1213// Collision Sides14#alias 0 : CSIDE_FLOOR1516// Global SFX17#alias 22 : SFX_G_EXPLOSION181920sub ObjectMain21if Object.OutOfBounds == true22Object.Type = TypeName[Blank Object]23end if2425if Object.State == BOMB2_FALLING26Object.YPos += Object.YVelocity27Object.YVelocity += 0x40002829ObjectTileCollision(CSIDE_FLOOR, 0, 8, 0)30if CheckResult == true31Object.State = BOMB2_TICKING32end if33else34if Object.Timer < 12035Object.Timer++36else37Object.Type = TypeName[Blank Object]38CreateTempObject(TypeName[Explosion], 0, Object.XPos, Object.YPos)39PlaySfx(SFX_G_EXPLOSION, false)40end if4142if Object.Timer > 6043Object.Frame = Object.Timer44Object.Frame &= 345Object.Frame >>= 146end if47end if48end sub495051sub ObjectPlayerInteraction52PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)53if CheckResult == true54CallFunction(Player_Hit)55end if56end sub575859sub ObjectDraw60DrawSprite(Object.Frame)61end sub626364sub ObjectStartup65LoadSpriteSheet("R6/Objects.gif")6667SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb68SpriteFrame(-8, -8, 16, 16, 60, 67) // #1 - Flashing Bomb69end sub707172// ========================73// Editor Subs74// ========================7576sub RSDKDraw77DrawSprite(0)78end sub798081sub RSDKLoad82LoadSpriteSheet("R6/Objects.gif")8384SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb8586SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")87end sub8889909192