Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R6/StatueBomb.txt
1319 views
1
//----------------Sonic CD Statue Bomb Script-----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.Timer
7
#alias Object.Value1 : Object.YVelocity
8
#alias Object.Value2 : Object.YLandingPos
9
10
// Global SFX
11
#alias 22 : SFX_G_EXPLOSION
12
13
14
sub ObjectMain
15
Object.YVelocity += 1024
16
Object.YPos += Object.YVelocity
17
18
if Object.YPos >= Object.YLandingPos
19
Object.YPos = Object.YLandingPos
20
Object.Type = TypeName[Blank Object]
21
22
CreateTempObject(TypeName[Explosion], 0, Object.XPos, Object.YPos)
23
PlaySfx(SFX_G_EXPLOSION, false)
24
end if
25
end sub
26
27
28
sub ObjectPlayerInteraction
29
PlayerObjectCollision(C_TOUCH, -8, -8, 8, 8)
30
if CheckResult == true
31
CallFunction(Player_Hit)
32
end if
33
end sub
34
35
36
sub ObjectDraw
37
TempValue0 = Object.Timer
38
TempValue0 >>= 1
39
DrawSprite(TempValue0)
40
41
Object.Timer++
42
Object.Timer &= 3
43
end sub
44
45
46
sub ObjectStartup
47
LoadSpriteSheet("R6/Objects.gif")
48
49
SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb frame 0
50
SpriteFrame(-8, -8, 16, 16, 60, 67) // #1 - Bomb frame 1
51
end sub
52
53
54
// ========================
55
// Editor Subs
56
// ========================
57
58
sub RSDKDraw
59
DrawSprite(0)
60
end sub
61
62
63
sub RSDKLoad
64
LoadSpriteSheet("R6/Objects.gif")
65
66
SpriteFrame(-8, -8, 16, 16, 43, 67) // #0 - Bomb
67
68
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
69
end sub
70
71