Path: blob/main/Scripts/R4/BossBullet.txt
1319 views
//----------------Sonic CD Boss Bullet 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.XVelocity7#alias Object.Value2 : Object.YVelocity8#alias Object.Value5 : Object.BossEntity9#alias Object.Value7 : Object.Animation1011// R4 Eggman aliases12#alias Object.Value7 : Boss.Animation13#alias Object.XPos : Boss.XPos14#alias Object.YPos : Boss.YPos15#alias Object.State : Boss.State1617// States18#alias 0 : BOSS_BULLET_SETUP19#alias 1 : BOSS_BULLET_CHARGE20#alias 2 : BOSS_BULLET_SHOT2122// R4 Eggman states23#alias 13 : R4_EGG_BUBBLE_MOVE_TO_L2425// R4 Eggman animations26#alias 1 : EGGANI_LAUGH272829sub ObjectMain30switch Object.State31case BOSS_BULLET_SETUP32if Object.Timer < 5633Object.Timer++34else35switch Object.PropertyValue36case 037Object.XVelocity = -0x1400038Object.YVelocity = 0x1400039break4041case 142Object.XVelocity = 043Object.YVelocity = 0x1C00044break4546case 247Object.XVelocity = 0x1000048Object.YVelocity = 0x1800049break5051case 352Object.XVelocity = 0x1400053Object.YVelocity = 0x1400054break5556case 457Object.XVelocity = 0x1400058Object.YVelocity = 0x1400059break6061case 562Object.XVelocity = 063Object.YVelocity = 0x1C00064break6566case 667Object.XVelocity = -0x1000068Object.YVelocity = 0x1800069break7071case 772Object.XVelocity = -0x1400073Object.YVelocity = 0x1400074break7576end switch7778Object.Timer = 079Object.State++80end if8182ArrayPos0 = Object.BossEntity8384Object.XPos = Boss[ArrayPos0].XPos85Object.YPos = Boss[ArrayPos0].YPos8687switch Object.PropertyValue88case 089Object.XPos -= 0x1D000090Object.YPos += 0x17000091break9293case 194Object.XPos -= 0x6000095Object.YPos += 0x20000096break9798case 299Object.XPos += 0x110000100Object.YPos += 0x1D0000101break102103case 3104Object.XPos += 0x1D0000105Object.YPos += 0x110000106break107108case 4109Object.XPos += 0x1D0000110Object.YPos += 0x170000111break112113case 5114Object.XPos += 0x60000115Object.YPos += 0x200000116break117118case 6119Object.XPos -= 0x110000120Object.YPos += 0x1D0000121break122123case 7124Object.XPos -= 0x1D0000125Object.YPos += 0x110000126break127128end switch129break130131case BOSS_BULLET_CHARGE132Object.XPos += Object.XVelocity133Object.YPos += Object.YVelocity134if Object.Timer < 60135Object.Timer++136else137Object.Timer = 0138Object.DrawOrder = 3139Object.State++140end if141break142143case BOSS_BULLET_SHOT144Object.XPos += Object.XVelocity145Object.YPos += Object.YVelocity146break147148end switch149150if Object.OutOfBounds == true151Object.Type = TypeName[Blank Object]152end if153154ArrayPos0 = Object.BossEntity155if Boss[ArrayPos0].State > R4_EGG_BUBBLE_MOVE_TO_L156Object.Type = TypeName[Blank Object]157end if158end sub159160161sub ObjectPlayerInteraction162if Object.State > BOSS_BULLET_SETUP163PlayerObjectCollision(C_TOUCH, -4, -4, 4, 4)164if CheckResult == true165CallFunction(Player_Hit)166if Player.State == Player_State_GotHit167ArrayPos0 = Object.BossEntity168Boss[ArrayPos0].Animation = EGGANI_LAUGH169end if170end if171end if172end sub173174175sub ObjectDraw176TempValue0 = Object.Frame177TempValue0 >>= 1178DrawSprite(TempValue0)179180Object.Frame++181Object.Frame &= 3182end sub183184185sub ObjectStartup186LoadSpriteSheet("R4/Objects2.gif")187188SpriteFrame(-4, -4, 8, 8, 52, 35) // #0 - Boss Bullet frame 0189SpriteFrame(-4, -4, 8, 8, 52, 44) // #1 - Boss Bullet frame 1190end sub191192193// ========================194// Editor Subs195// ========================196197sub RSDKDraw198DrawSprite(0)199end sub200201202sub RSDKLoad203LoadSpriteSheet("R4/Objects2.gif")204205SpriteFrame(-4, -4, 8, 8, 52, 35) // #0 - Boss Bullet206207SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")208end sub209210211