Path: blob/main/Scripts/R4/BossBubble2.txt
1319 views
//---------------Sonic CD Boss Bubble 2 Script----------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.Timer67// States8#alias 0 : BOSSBUBBLE2_GROWTH_19#alias 1 : BOSSBUBBLE2_GROWTH_210#alias 2 : BOSSBUBBLE2_BREATHABLE11#alias 3 : BOSSBUBBLE2_CONSUMED12#alias 4 : BOSSBUBBLE2_DISSAPEAR1314// Stage SFX15#alias 6 : SFX_S_BREATHING161718sub ObjectMain19switch Object.State20case BOSSBUBBLE2_GROWTH_121if Object.Timer < 2022Object.Timer++23else24Object.State++25end if26break2728case BOSSBUBBLE2_GROWTH_229Object.State++30break3132case BOSSBUBBLE2_BREATHABLE // only here for display purposes, waits for player to interact with it33break3435case BOSSBUBBLE2_CONSUMED36if Object.Timer < 2237Object.Timer++38else39Object.State++40end if41break4243case BOSSBUBBLE2_DISSAPEAR44if Object.Timer < 4245Object.Timer++46else47Object.Type = TypeName[Blank Object]48end if49break50end switch51end sub525354sub ObjectPlayerInteraction55if Object.State == BOSSBUBBLE2_BREATHABLE56CheckResult = false57if Player.Animation == ANI_JUMPING58CheckResult = true59end if60#platform: Use_Origins61if Stage.PlayerListPos == PLAYER_KNUCKLES62if Player.Animation == ANI_GLIDING63CheckResult = true64end if65if Player.Animation == ANI_GLIDING_STOP66CheckResult = true67end if68end if69if Stage.PlayerListPos == PLAYER_AMY70if Player.Animation == ANI_HAMMER_JUMP71CheckResult = true72end if73end if74#endplatform75if CheckResult == true76PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)77if CheckResult == true78Object.State = BOSSBUBBLE2_CONSUMED79FlipSign(Player.Speed)80FlipSign(Player.XVelocity)8182Player.YVelocity = 0x4000083#platform: Use_Origins84if Player.Animation == ANI_HAMMER_JUMP85Player.State = Player_State_Air_NoDropDash86end if87#endplatform8889Player.Animation = ANI_BREATHING90Player.AirTimer = 09192PlayStageSfx(SFX_S_BREATHING, false)9394#platform: Use_Haptics95HapticEffect(19, 0, 0, 0)96#endplatform97end if98end if99100if Player.Animation == ANI_FLYING101PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)102if CheckResult == true103Object.State = BOSSBUBBLE2_CONSUMED104FlipSign(Player.Speed)105FlipSign(Player.XVelocity)106107Player.YVelocity = 0x40000108109Player.Animation = ANI_BREATHING110111#platform: Use_Origins112Player.State = Player_State_Air_NoDropDash113#endplatform114115#platform: Use_Standalone116Player.State = Player_State_Air117#endplatform118119Player.AirTimer = 0120PlayStageSfx(SFX_S_BREATHING, false)121122#platform: Use_Haptics123HapticEffect(19, 0, 0, 0)124#endplatform125end if126end if127end if128end sub129130131sub ObjectDraw132DrawSprite(Object.State)133end sub134135136sub ObjectStartup137LoadSpriteSheet("R4/Objects2.gif")138139SpriteFrame(-8, -8, 16, 16, 99, 118) // #0 - Small bubble140SpriteFrame(-12, -12, 24, 24, 116, 126) // #1 - Medium bubble141SpriteFrame(-16, -16, 32, 32, 222, 115) // #2 - Big bubble142SpriteFrame(-16, -16, 32, 32, 189, 115) // #3 - Big bubble inhaled143SpriteFrame(-16, -16, 32, 32, 156, 126) // #4 - Big bubler bursted144end sub145146147// ========================148// Editor Subs149// ========================150151sub RSDKDraw152DrawSprite(0)153end sub154155156sub RSDKLoad157LoadSpriteSheet("R4/Objects2.gif")158SpriteFrame(-16, -16, 32, 32, 222, 115) // #2 - Big bubble159160SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")161end sub162163164