0% found this document useful (0 votes)
17 views2 pages

Sonic CD Bomb Script Overview

This document contains a script for a Sonic CD Statue Bomb, authored by Christian Whitehead and unpacked by Rubberduckycooly. It includes functions for object behavior, player interaction, drawing the object, and loading sprites. The script manages the bomb's explosion effect and player collision detection within the game environment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Sonic CD Bomb Script Overview

This document contains a script for a Sonic CD Statue Bomb, authored by Christian Whitehead and unpacked by Rubberduckycooly. It includes functions for object behavior, player interaction, drawing the object, and loading sprites. The script manages the bomb's explosion effect and player collision detection within the game environment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

//----------------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

You might also like