//----------------Sonic CD Statue Bomb Script-----------------//
//--------Scripted by Christian Whitehead 'The Taxman'--------//
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
// Aliases
#alias Object.Value0 : Object.Timer
#alias Object.Value1 : Object.YVelocity
#alias Object.Value2 : Object.YLandingPos
// Global SFX
#alias 22 : SFX_G_EXPLOSION
sub ObjectMain
Object.YVelocity += 1024
Object.YPos += Object.YVelocity
if Object.YPos >= Object.YLandingPos
Object.YPos = Object.YLandingPos
Object.Type = TypeName[Blank Object]
CreateTempObject(TypeName[Explosion], 0, Object.XPos, Object.YPos)
PlaySfx(SFX_G_EXPLOSION, false)
end if
end sub
sub ObjectPlayerInteraction
PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)
if CheckResult == true
CallFunction(Player_Hit)
end if
end sub
sub ObjectDraw
TempValue0 = Object.Timer
TempValue0 >>= 1
DrawSprite(TempValue0)
Object.Timer++
Object.Timer &= 3
end sub
sub ObjectStartup
LoadSpriteSheet("R6/Objects.gif")
SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb frame 0
SpriteFrame(-8, -8, 16, 16, 60, 67) // #1 - Bomb frame 1
end sub
// ========================
// Editor Subs
// ========================
sub RSDKDraw
DrawSprite(0)
end sub
sub RSDKLoad
LoadSpriteSheet("R6/Objects.gif")
SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end sub