Path: blob/main/Scripts/R6/Bomb.txt
1319 views
//---------------Sonic CD Semi Bomb Script--------------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.Timer6#alias Object.Value1 : Object.YVelocity78// States9#alias 0 : BOMB_FALLING10#alias 1 : BOMB_TICKING1112// Collision Sides13#alias 0 : CSIDE_FLOOR1415// Global SFX16#alias 22 : SFX_G_EXPLOSION171819sub ObjectMain20if Object.State == BOMB_FALLING21Object.YPos += Object.YVelocity22Object.YVelocity += 0x20002324ObjectTileCollision(CSIDE_FLOOR, 0, 8, 0)25if CheckResult == true26Object.State = BOMB_TICKING27end if28else29if Object.Timer < 24030Object.Timer++31else32Object.Type = TypeName[Blank Object]33CreateTempObject(TypeName[Explosion], 0, Object.XPos, Object.YPos)34PlaySfx(SFX_G_EXPLOSION, false)35end if3637if Object.Timer > 12038Object.Frame = Object.Timer39Object.Frame &= 340Object.Frame >>= 141end if42end if4344if Object.OutOfBounds == true45Object.Type = TypeName[Blank Object]46end if47end sub484950sub ObjectPlayerInteraction51PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)52if CheckResult == true53CallFunction(Player_Hit)54end if55end sub565758sub ObjectDraw59DrawSprite(Object.Frame)60end sub616263sub ObjectStartup64LoadSpriteSheet("R6/Objects.gif")6566SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb67SpriteFrame(-8, -8, 16, 16, 60, 67) // #1 - Flashing Bomb68end sub697071// ========================72// Editor Subs73// ========================7475sub RSDKDraw76DrawSprite(0)77end sub787980sub RSDKLoad81LoadSpriteSheet("R6/Objects.gif")8283SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb8485SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")86end sub878889